PHP Класс skeeks\cms\relatedProperties\models\RelatedPropertiesModel

Наследование: extends yii\base\DynamicModel
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$relatedElementModel RelatedElementModel

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
_deleteRelatedPropertyValue ( RelatedPropertyModel $property )
_saveRelatedPropertyValue ( RelatedPropertyModel $property )

Описание методов

_deleteRelatedPropertyValue() защищенный Метод

protected _deleteRelatedPropertyValue ( RelatedPropertyModel $property )
$property RelatedPropertyModel

_saveRelatedPropertyValue() защищенный Метод

protected _saveRelatedPropertyValue ( RelatedPropertyModel $property )
$property RelatedPropertyModel

attributeHints() публичный Метод

public attributeHints ( ) : array
Результат array

attributeLabels() публичный Метод

public attributeLabels ( )

delete() публичный Метод

public delete ( ) : boolean
Результат boolean

getAttribute() публичный Метод

If this record is the result of a query and the attribute is not loaded, null will be returned.
См. также: hasAttribute()
public getAttribute ( string $name ) : mixed
$name string the attribute name
Результат mixed the attribute value. Null if the attribute is not set or does not exist.

getEnumByAttribute() публичный Метод

public getEnumByAttribute ( $name ) : RelatedPropertyEnumModel | RelatedPropertyEnumModel[] | null
$name
Результат RelatedPropertyEnumModel | RelatedPropertyEnumModel[] | null

getProperties() публичный Метод

public getProperties ( ) : RelatedPropertyModel[]
Результат RelatedPropertyModel[]

getRelatedElementProperties() публичный Метод

public getRelatedElementProperties ( string $name ) : RelatedElementPropertyModel | RelatedElementPropertyModel[]
$name string
Результат RelatedElementPropertyModel | RelatedElementPropertyModel[]

getRelatedProperty() публичный Метод

public getRelatedProperty ( string $name ) : RelatedPropertyModel
$name string
Результат RelatedPropertyModel

getSmartAttribute() публичный Метод

public getSmartAttribute ( $name ) : string
$name
Результат string

hasAttribute() публичный Метод

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
Результат boolean whether the model has an attribute with the specified name.

init() публичный Метод

public init ( )

loadDefaultValues() публичный Метод

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() публичный Метод

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.
Результат boolean whether the saving succeeded (i.e. no validation errors occurred).

setAttribute() публичный Метод

Sets the named attribute value.
См. также: hasAttribute()
public setAttribute ( string $name, mixed $value )
$name string the attribute name
$value mixed the attribute value.

Описание свойств

$relatedElementModel публичное свойство

public RelatedElementModel $relatedElementModel
Результат RelatedElementModel