|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Protected Member Functions | |
| _construct () | |
| _validate () | |
Protected Member Functions inherited from AbstractModel | |
| _construct () | |
| _init ($resourceModel) | |
| _setResourceModel ($resourceName, $collectionName=null) | |
| _getResource () | |
| _getEventData () | |
| _beforeLoad ($modelId, $field=null) | |
| _afterLoad () | |
| _hasModelChanged () | |
| _getValidatorBeforeSave () | |
| _createValidatorBeforeSave () | |
| _getValidationRulesBeforeSave () | |
| _clearReferences () | |
| _clearData () | |
Protected Member Functions inherited from DataObject | |
| _getData ($key) | |
| _underscore ($name) | |
Protected Attributes | |
| $_eventPrefix = 'theme' | |
| $_eventObject = 'theme' | |
| $_themeFactory | |
| $_domainFactory | |
| $_imageFactory | |
| $_validator | |
| $_customization | |
| $_customFactory | |
| $inheritanceSequence | |
Protected Attributes inherited from AbstractModel | |
| $_eventPrefix = 'core_abstract' | |
| $_eventObject = 'object' | |
| $_idFieldName = 'id' | |
| $_hasDataChanges = false | |
| $_origData | |
| $_isDeleted = false | |
| $_resource | |
| $_resourceCollection | |
| $_resourceName | |
| $_collectionName | |
| $_cacheTag = false | |
| $_dataSaveAllowed = true | |
| $_isObjectNew = null | |
| $_validatorBeforeSave = null | |
| $_eventManager | |
| $_cacheManager | |
| $_registry | |
| $_logger | |
| $_appState | |
| $_actionValidator | |
| $storedData = [] | |
Protected Attributes inherited from DataObject | |
| $_data = [] | |
Additional Inherited Members | |
Data Fields inherited from ThemeInterface | |
| const | PATH_SEPARATOR = '/' |
| const | CODE_SEPARATOR = '/' |
| const | TYPE_PHYSICAL = 0 |
| const | TYPE_VIRTUAL = 1 |
| const | TYPE_STAGING = 2 |
Static Protected Attributes inherited from DataObject | |
| static | $_underscoreCache = [] |
Theme model class
@method string getPackageCode() @method string getParentThemePath() @method string getParentId() @method string getThemeTitle() @method string getPreviewImage() @method bool getIsFeatured() @method int getThemeId() @method int getType() @method array getAssignedStores() @method ThemeInterface setAssignedStores(array $stores) @method ThemeInterface setParentId(int $id) @method ThemeInterface setParentTheme($parentTheme) @method ThemeInterface setPackageCode(string $packageCode) @method ThemeInterface setThemeCode(string $themeCode) @method ThemeInterface setThemePath(string $themePath) @method ThemeInterface setThemeTitle(string $themeTitle) @method ThemeInterface setType(int $type) @method ThemeInterface setCode(string $code)
@SuppressWarnings(PHPMD.CouplingBetweenObjects)
| __construct | ( | \Magento\Framework\Model\Context | $context, |
| \Magento\Framework\Registry | $registry, | ||
| \Magento\Framework\View\Design\Theme\FlyweightFactory | $themeFactory, | ||
| \Magento\Framework\View\Design\Theme\Domain\Factory | $domainFactory, | ||
| \Magento\Framework\View\Design\Theme\ImageFactory | $imageFactory, | ||
| \Magento\Framework\View\Design\Theme\Validator | $validator, | ||
| \Magento\Framework\View\Design\Theme\CustomizationFactory | $customizationFactory, | ||
| \Magento\Theme\Model\ResourceModel\Theme | $resource = null, |
||
| ThemeCollection | $resourceCollection = null, |
||
| array | $data = [], |
||
| ThemeFactory | $themeModelFactory = null |
||
| ) |
Initialize dependencies
| \Magento\Framework\Model\Context | $context | |
| \Magento\Framework\Registry | $registry | |
| \Magento\Framework\View\Design\Theme\FlyweightFactory | $themeFactory | |
| \Magento\Framework\View\Design\Theme\Domain\Factory | $domainFactory | |
| \Magento\Framework\View\Design\Theme\ImageFactory | $imageFactory | |
| \Magento\Framework\View\Design\Theme\Validator | $validator | |
| \Magento\Framework\View\Design\Theme\CustomizationFactory | $customizationFactory | |
| \Magento\Theme\Model\ResourceModel\Theme | $resource | |
| \Magento\Theme\Model\ResourceModel\Theme\Collection | $resourceCollection | |
| array | $data | |
| ThemeFactory | $themeModelFactory | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 108 of file Theme.php.
|
protected |
Validate theme data
| afterDelete | ( | ) |
| getArea | ( | ) |
{Retrieve code of an area a theme belongs to
Implements ThemeInterface.
Definition at line 266 of file Theme.php.
| getCode | ( | ) |
{Get code of the theme
Implements ThemeInterface.
Definition at line 299 of file Theme.php.
| getCustomization | ( | ) |
| getDomainModel | ( | $type = null | ) |
| getFullPath | ( | ) |
Retrieve theme full path which is used to distinguish themes if they are not in DB yet
Alternative id looks like "<area>/<theme_path>". Used as id in file-system theme collection
Implements ThemeInterface.
Definition at line 291 of file Theme.php.
| getInheritedThemes | ( | ) |
Return the full theme inheritance sequence, from the root theme till a specified one
Implements ThemeInterface.
Definition at line 373 of file Theme.php.
| getParentTheme | ( | ) |
{Retrieve parent theme instance
Implements ThemeInterface.
Definition at line 249 of file Theme.php.
| getStagingVersion | ( | ) |
| getThemeImage | ( | ) |
| getThemePath | ( | ) |
{Retrieve theme path unique within an area
Implements ThemeInterface.
Definition at line 278 of file Theme.php.
| hasChildThemes | ( | ) |
| isEditable | ( | ) |
| isPhysical | ( | ) |
Check if theme is physical
Implements ThemeInterface.
Definition at line 197 of file Theme.php.
| isVirtual | ( | ) |
Check if theme is virtual
Definition at line 187 of file Theme.php.
| isVisible | ( | ) |
| populateFromArray | ( | array | $data | ) |