attributes() public method

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
return array list of attribute names.
コード例 #1
0
ファイル: Document.php プロジェクト: shubnikofff/mobiles
 public function attributes()
 {
     return array_merge(parent::attributes(), ['ownerId', 'contentType']);
 }
コード例 #2
0
ファイル: File.php プロジェクト: shubnikofff/teleport
 public function attributes()
 {
     return array_merge(parent::attributes(), ['mimeType']);
 }
コード例 #3
0
ファイル: Documents.php プロジェクト: KasselR/yii2-kr
 public function attributes()
 {
     return array_merge(parent::attributes(), ['filename', 'metadata', 'metadatanew', 'uploadDate', 'groups', 'onlineStatus', 'updated_by', 'updated_at']);
 }
コード例 #4
0
 public function attributes()
 {
     return array_merge(parent::attributes(), ['userId', 'contentType', 'description']);
 }
コード例 #5
0
ファイル: UserFile.php プロジェクト: lawguangwei/webDB
 public function attributes()
 {
     return array_merge(parent::attributes(), ['filesize', 'filetype']);
 }