getAttributes() public method

Get all entity attributes
public getAttributes ( ) : ArrayObject
return Webiny\Component\StdLib\StdObject\ArrayObject\ArrayObject
コード例 #1
0
 /**
  * Get default list of entity attributes.<br>
  * Only simple and Many2One attributes are considered to be default attributes.
  *
  * @return string
  */
 private function getDefaultAttributes()
 {
     $attributes = ['id'];
     foreach ($this->entity->getAttributes() as $name => $attribute) {
         /* @var AbstractAttribute $attribute */
         if ($attribute->getToArrayDefault()) {
             $attributes[] = $name;
         }
     }
     return $this->arr($attributes)->implode(',')->val();
 }