Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
1,599 additions
and
512 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace LimeSurvey\Datavalueobjects; | ||
|
||
/** | ||
* Class ThemeFileCategory | ||
* | ||
* This class represents a theme file category (eg. Global files, Theme files, Survey files) | ||
* | ||
* @package LimeSurvey\DataValueObject | ||
*/ | ||
class ThemeFileCategory | ||
{ | ||
|
||
/** @var string the category name */ | ||
public $name; | ||
|
||
/** @var string the display title for the category */ | ||
public $title; | ||
|
||
/** @var string the base path for the category */ | ||
public $path; | ||
|
||
/** @var string the "virtual" path prefix (eg. 'image::generalfiles::') */ | ||
public $pathPrefix; | ||
|
||
/** | ||
* @param string $name | ||
* @param string $title | ||
* @param string $path | ||
* @param string $pathPrefix | ||
*/ | ||
public function __construct($name, $title, $path, $pathPrefix) | ||
{ | ||
$this->name = $name; | ||
$this->title = $title; | ||
$this->path = $path; | ||
$this->pathPrefix = $pathPrefix; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
namespace LimeSurvey\Datavalueobjects; | ||
|
||
/** | ||
* Class ThemeFileInfo | ||
* | ||
* This class represents a theme file. It includes the real path, the virtual path, and the category. | ||
* | ||
* Virtual paths are a special notation for relative paths, including a prefix to give context. | ||
* Eg.: the path "image::theme::files/logo.png" is relative to the theme folder, while | ||
* "image::generalfiles::" is relative to the general files folder. | ||
* If $path is not valid, returns null. | ||
* Paths can be | ||
* - related to a global theme option and hence the file be located on the generalfiles directory. | ||
* - related to a survey theme option and hence the file be located relative to a survey upload directory. | ||
* - related to a theme and hence the file be located on the theme directory (eg. when uploaded from theme editor) | ||
* | ||
* @package LimeSurvey\DataValueObject | ||
*/ | ||
class ThemeFileInfo | ||
{ | ||
|
||
/** @var string the real path to the file (eg. '/var/www/html/limesurvey/themes/survey/vanilla/files/logo.png') */ | ||
public $realPath; | ||
|
||
/** @var string the virtual path to the file (eg. 'image::theme::logo.png') */ | ||
public $virtualPath; | ||
|
||
/** @var ThemeFileCategory */ | ||
public $category; | ||
|
||
/** | ||
* @param string $realPath | ||
* @param string $virtualPath | ||
* @param ThemeFileCategory $category | ||
*/ | ||
public function __construct($realPath, $virtualPath, $category) | ||
{ | ||
$this->realPath = $realPath; | ||
$this->virtualPath = $virtualPath; | ||
$this->category = $category; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.