Neos\Media\Domain\Model\Asset::__construct PHP Метод

__construct() публичный Метод

Constructs an asset. The resource is set internally and then initialize() is called.
public __construct ( PersistentResource $resource )
$resource Neos\Flow\ResourceManagement\PersistentResource
    public function __construct(PersistentResource $resource)
    {
        $this->tags = new ArrayCollection();
        $this->thumbnails = new ArrayCollection();
        $this->resource = $resource;
        $this->lastModified = new \DateTime();
        $this->assetCollections = new ArrayCollection();
    }

Usage Example

Пример #1
0
 /**
  * Constructs the object and sets default values for width and height
  *
  * @param PersistentResource $resource
  */
 public function __construct(PersistentResource $resource)
 {
     parent::__construct($resource);
     $this->width = -1;
     $this->height = -1;
 }
All Usage Examples Of Neos\Media\Domain\Model\Asset::__construct