Xpressengine\Support\Entity::__construct PHP Méthode

__construct() public méthode

Constructor
public __construct ( array $attributes = [] )
$attributes array attributes
    public function __construct($attributes = [])
    {
        parent::__construct($attributes);
        $this->syncOriginal();
    }

Usage Example

 /**
  * constructor
  *
  * @param array $attributes attributes array
  */
 public function __construct(array $attributes = [])
 {
     parent::__construct($attributes);
     $grantInfo = isset($attributes['grants']) ? json_decode($attributes['grants'], true) : [];
     $this->grant = new Grant($grantInfo);
 }
All Usage Examples Of Xpressengine\Support\Entity::__construct