PHP Class skeeks\cms\relatedProperties\models\RelatedPropertiesModel

Inheritance: extends yii\base\DynamicModel
Afficher le fichier Open project: skeeks-cms/cms Class Usage Examples

Méthodes publiques

Свойство Type Description
$relatedElementModel RelatedElementModel

Méthodes publiques

Méthode Description
attributeHints ( ) : array
attributeLabels ( )
delete ( ) : boolean
getAttribute ( string $name ) : mixed Returns the named attribute value.
getEnumByAttribute ( $name ) : RelatedPropertyEnumModel | RelatedPropertyEnumModel[] | null
getProperties ( ) : RelatedPropertyModel[]
getRelatedElementProperties ( string $name ) : RelatedElementPropertyModel | RelatedElementPropertyModel[]
getRelatedProperty ( string $name ) : RelatedPropertyModel
getSmartAttribute ( $name ) : string
hasAttribute ( string $name ) : boolean Returns a value indicating whether the model has an attribute with the specified name.
init ( )
loadDefaultValues ( boolean $skipIfSet = true ) Loads default values from database table schema
save ( boolean $runValidation = true, array $attributeNames = null ) : boolean Saves the current record.
setAttribute ( string $name, mixed $value ) Sets the named attribute value.

Méthodes protégées

Méthode Description
_deleteRelatedPropertyValue ( RelatedPropertyModel $property )
_saveRelatedPropertyValue ( RelatedPropertyModel $property )

Method Details

_deleteRelatedPropertyValue() protected méthode

protected _deleteRelatedPropertyValue ( RelatedPropertyModel $property )
$property RelatedPropertyModel

_saveRelatedPropertyValue() protected méthode

protected _saveRelatedPropertyValue ( RelatedPropertyModel $property )
$property RelatedPropertyModel

attributeHints() public méthode

public attributeHints ( ) : array
Résultat array

attributeLabels() public méthode

public attributeLabels ( )

delete() public méthode

public delete ( ) : boolean
Résultat boolean

getAttribute() public méthode

If this record is the result of a query and the attribute is not loaded, null will be returned.
See also: hasAttribute()
public getAttribute ( string $name ) : mixed
$name string the attribute name
Résultat mixed the attribute value. Null if the attribute is not set or does not exist.

getEnumByAttribute() public méthode

public getEnumByAttribute ( $name ) : RelatedPropertyEnumModel | RelatedPropertyEnumModel[] | null
$name
Résultat RelatedPropertyEnumModel | RelatedPropertyEnumModel[] | null

getProperties() public méthode

public getProperties ( ) : RelatedPropertyModel[]
Résultat RelatedPropertyModel[]

getRelatedElementProperties() public méthode

public getRelatedElementProperties ( string $name ) : RelatedElementPropertyModel | RelatedElementPropertyModel[]
$name string
Résultat RelatedElementPropertyModel | RelatedElementPropertyModel[]

getRelatedProperty() public méthode

public getRelatedProperty ( string $name ) : RelatedPropertyModel
$name string
Résultat RelatedPropertyModel

getSmartAttribute() public méthode

public getSmartAttribute ( $name ) : string
$name
Résultat string

hasAttribute() public méthode

Returns a value indicating whether the model has an attribute with the specified name.
public hasAttribute ( string $name ) : boolean
$name string the name of the attribute
Résultat boolean whether the model has an attribute with the specified name.

init() public méthode

public init ( )

loadDefaultValues() public méthode

You may call this method to load default values after creating a new instance: php class Customer extends \yii\db\ActiveRecord $customer = new Customer(); $customer->loadDefaultValues();
public loadDefaultValues ( boolean $skipIfSet = true )
$skipIfSet boolean whether existing value should be preserved. This will only set defaults for attributes that are `null`.

save() public méthode

This method will call [[insert()]] when [[isNewRecord]] is true, or [[update()]] when [[isNewRecord]] is false. For example, to save a customer record: php $customer = new Customer; // or $customer = Customer::findOne($id); $customer->name = $name; $customer->email = $email; $customer->save();
public save ( boolean $runValidation = true, array $attributeNames = null ) : boolean
$runValidation boolean whether to perform validation (calling [[validate()]]) before saving the record. Defaults to `true`. If the validation fails, the record will not be saved to the database and this method will return `false`.
$attributeNames array list of attribute names that need to be saved. Defaults to null, meaning all attributes that are loaded from DB will be saved.
Résultat boolean whether the saving succeeded (i.e. no validation errors occurred).

setAttribute() public méthode

Sets the named attribute value.
See also: hasAttribute()
public setAttribute ( string $name, mixed $value )
$name string the attribute name
$value mixed the attribute value.

Property Details

$relatedElementModel public_oe property

public RelatedElementModel $relatedElementModel
Résultat RelatedElementModel