Webiny\Component\Entity\AbstractEntity::attr PHP Method

attr() public method

public attr ( $attribute ) : EntityAttributeBuilder
$attribute
return EntityAttributeBuilder
    public function attr($attribute)
    {
        return $this->attributeBuilder->attr($attribute);
    }

Usage Example

Esempio n. 1
0
 /**
  * Create new attribute or get name of current attribute
  *
  * @param null|string $attribute
  *
  * @return EntityAttributeBuilder|string
  */
 public function attr($attribute = null)
 {
     if ($this->isNull($attribute)) {
         return $this->attribute;
     }
     return $this->parent->attr($attribute);
 }