Neos\Media\Domain\Model\ThumbnailConfiguration::toArray PHP Метод

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

public toArray ( ) : array
Результат array
    public function toArray()
    {
        $data = array_filter(['width' => $this->getWidth(), 'maximumWidth' => $this->getMaximumWidth(), 'height' => $this->getHeight(), 'maximumHeight' => $this->getMaximumHeight(), 'ratioMode' => $this->getRatioMode(), 'allowUpScaling' => $this->isUpScalingAllowed()], function ($value) {
            return $value !== null;
        });
        ksort($data);
        return $data;
    }

Usage Example

 /**
  * @param ThumbnailConfiguration $configuration
  * @return void
  */
 protected function setConfiguration(ThumbnailConfiguration $configuration)
 {
     $this->configuration = $configuration->toArray();
     $this->configurationHash = $configuration->getHash();
 }