Свойство | Тип | Описание | |
---|---|---|---|
$arrData | array | The data array containing the raw values obtained from the attributes. | |
$metaModel | metamodels\IMetaModel | Get's populated with the first call to getMetaModel() (lazy initialization). |
Метод | Описание | |
---|---|---|
__construct ( metamodels\IMetaModel $objMetaModel, array $arrData ) | Create a new instance. | |
buildJumpToLink ( MetaModels\Render\Setting\ICollection $objSettings ) : array | Build the jumpTo link for use in templates. | |
copy ( ) : metamodels\IItem | Returns a new item containing the same values as this item but no id. | |
get ( string $strAttributeName ) : mixed | Return the native value of an attribute. | |
getAttribute ( string $strAttributeName ) : MetaModels\Attribute\IAttribute | Fetch the MetaModel attribute instance with the given name. | |
getMetaModel ( ) : metamodels\IMetaModel | Fetch the MetaModel that this item is originating from. | |
getServiceContainer ( ) : metamodels\IMetaModelsServiceContainer | Retrieve the service container. | |
getSetAttributes ( ) : array | Return a list of the col names from the attributes which are set. | |
getSiblings ( MetaModels\Filter\IFilter $objFilter ) : null | metamodels\IItems | Find all Variants including the variant base. | |
getVariants ( MetaModels\Filter\IFilter $objFilter ) : metamodels\IItems | Fetch the meta model variants for this item. | |
internalParseAttribute ( MetaModels\Attribute\IAttribute $objAttribute, string $strOutputFormat, MetaModels\Render\Setting\ICollection | null $objSettings ) : array | Helper function for {@see MetaModelItem::parseValue()} and {@see MetaModelItem::parseAttribute()}. | |
isAttributeSet ( string $strAttributeName ) : boolean | Check if the given attribute is set. This mean if in the data array is the filed set or not. If the attribute is not loaded the function will return false. | |
isVariant ( ) : boolean | Determines if this item is a variant of another item. | |
isVariantBase ( ) : boolean | Determines if this item is variant base of other items. | |
parseAttribute ( string $strAttributeName, string $strOutputFormat = 'text', MetaModels\Render\Setting\ICollection $objSettings = null ) : array | Renders a single attribute in the given output format. | |
parseValue ( string $strOutputFormat = 'text', MetaModels\Render\Setting\ICollection $objSettings = null ) : array | Renders the item in the given output format. | |
save ( ) : void | Save the current data for every attribute to the data sink. | |
set ( string $strAttributeName, mixed $varValue ) : metamodels\IItem | Set the native value of an Attribute. | |
varCopy ( ) : MetaModels\IItem | Returns a new item containing the same values as this item but no id. |
Метод | Описание | |
---|---|---|
getEventDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface | Retrieve the event dispatcher. | |
isArrayEmpty ( array $arrArray ) : boolean | Run through each level of an array and check if we have at least one empty value. | |
isEmptyValue ( array $mixValue ) : boolean | Check if a value is empty. | |
registerAssets ( MetaModels\Render\Setting\ICollection | null $objSettings ) : void | Register the assets in Contao. |
public __construct ( metamodels\IMetaModel $objMetaModel, array $arrData ) | ||
$objMetaModel | metamodels\IMetaModel | The model this item is represented by. |
$arrData | array | The initial data that shall be injected into the new instance. |
public buildJumpToLink ( MetaModels\Render\Setting\ICollection $objSettings ) : array | ||
$objSettings | MetaModels\Render\Setting\ICollection | The render settings to use. |
Результат | array |
public copy ( ) : metamodels\IItem | ||
Результат | metamodels\IItem | the new copy. |
public getAttribute ( string $strAttributeName ) : MetaModels\Attribute\IAttribute | ||
$strAttributeName | string | The name of the attribute. |
Результат | MetaModels\Attribute\IAttribute | The instance. |
protected getEventDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface | ||
Результат | Symfony\Component\EventDispatcher\EventDispatcherInterface |
public getMetaModel ( ) : metamodels\IMetaModel | ||
Результат | metamodels\IMetaModel | the instance. |
public getServiceContainer ( ) : metamodels\IMetaModelsServiceContainer | ||
Результат | metamodels\IMetaModelsServiceContainer |
public getSetAttributes ( ) : array | ||
Результат | array |
public getSiblings ( MetaModels\Filter\IFilter $objFilter ) : null | metamodels\IItems | ||
$objFilter | MetaModels\Filter\IFilter | The additional filter settings to apply. |
Результат | null | metamodels\IItems |
public getVariants ( MetaModels\Filter\IFilter $objFilter ) : metamodels\IItems | ||
$objFilter | MetaModels\Filter\IFilter | The filter settings to be applied. |
Результат | metamodels\IItems | A list of all variants for this item. |
public internalParseAttribute ( MetaModels\Attribute\IAttribute $objAttribute, string $strOutputFormat, MetaModels\Render\Setting\ICollection | null $objSettings ) : array | ||
$objAttribute | MetaModels\Attribute\IAttribute | The attribute to parse. |
$strOutputFormat | string | The desired output format. |
$objSettings | MetaModels\Render\Setting\ICollection | null | The settings object to be applied. |
Результат | array | The parsed information for the given attribute. |
protected isArrayEmpty ( array $arrArray ) : boolean | ||
$arrArray | array | The array to check. |
Результат | boolean | True => empty, False => some values found. |
public isAttributeSet ( string $strAttributeName ) : boolean | ||
$strAttributeName | string | The desired attribute. |
Результат | boolean | True means the data is set, on load of the item or at any time. False means the attribute is not set. |
protected isEmptyValue ( array $mixValue ) : boolean | ||
$mixValue | array | The value. |
Результат | boolean | True => empty, false => found a valid values |
public isVariantBase ( ) : boolean | ||
Результат | boolean | True if it is an variant base, false otherwise. |
public parseAttribute ( string $strAttributeName, string $strOutputFormat = 'text', MetaModels\Render\Setting\ICollection $objSettings = null ) : array | ||
$strAttributeName | string | The desired attribute. |
$strOutputFormat | string | The desired output format (optional - default: text). |
$objSettings | MetaModels\Render\Setting\ICollection | The render settings to use (optional - default: null). |
Результат | array | format=>value |
public parseValue ( string $strOutputFormat = 'text', MetaModels\Render\Setting\ICollection $objSettings = null ) : array | ||
$strOutputFormat | string | The desired output format (optional - default: text). |
$objSettings | MetaModels\Render\Setting\ICollection | The render settings to use (optional - default: null). |
Результат | array | attribute name => format => value |
protected registerAssets ( MetaModels\Render\Setting\ICollection | null $objSettings ) : void | ||
$objSettings | MetaModels\Render\Setting\ICollection | null | The render settings to use. |
Результат | void |
public varCopy ( ) : MetaModels\IItem | ||
Результат | MetaModels\IItem | the new copy. |
protected array $arrData | ||
Результат | array |