This method could be overridden by child classes to define available attributes.
Note: all attributes defined in base Active Record class should be always present
in returned array.
For example:
php
public function attributes()
{
return array_merge(
parent::attributes(),
['tags', 'status']
);
}
public attributes ( ) : array | ||
Результат | array | list of attribute names. |
public function attributes() { return array_merge(parent::attributes(), ['ownerId', 'contentType']); }
public function attributes() { return array_merge(parent::attributes(), ['mimeType']); }
public function attributes() { return array_merge(parent::attributes(), ['filename', 'metadata', 'metadatanew', 'uploadDate', 'groups', 'onlineStatus', 'updated_by', 'updated_at']); }
public function attributes() { return array_merge(parent::attributes(), ['userId', 'contentType', 'description']); }
public function attributes() { return array_merge(parent::attributes(), ['filesize', 'filetype']); }