eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::getPropertyMapping PHP Метод

getPropertyMapping() защищенный Метод

Returns a column to property mapping for the storage table.
protected getPropertyMapping ( ) : array
Результат array
    protected function getPropertyMapping()
    {
        return array('filename' => array('name' => 'id', 'cast' => 'strval'), 'mime_type' => array('name' => 'mimeType', 'cast' => 'strval'), 'original_filename' => array('name' => 'fileName', 'cast' => 'strval'));
    }

Usage Example

 /**
  * Returns a column to property mapping for the storage table.
  *
  * @return void
  */
 protected function getPropertyMapping()
 {
     $propertyMap = parent::getPropertyMapping();
     $propertyMap['has_controller'] = array('name' => 'hasController', 'cast' => function ($val) {
         return (bool) $val;
     });
     $propertyMap['is_autoplay'] = array('name' => 'autoplay', 'cast' => function ($val) {
         return (bool) $val;
     });
     $propertyMap['is_loop'] = array('name' => 'loop', 'cast' => function ($val) {
         return (bool) $val;
     });
     $propertyMap['width'] = array('name' => 'width', 'cast' => 'intval');
     $propertyMap['height'] = array('name' => 'height', 'cast' => 'intval');
     return $propertyMap;
 }
All Usage Examples Of eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\LegacyStorage::getPropertyMapping