getDefault() public method

public getDefault ( )
 public function testSetDefault()
 {
     $options = array('test' => array());
     $expected = array('test' => array(), 'assets' => array(), 'options' => array());
     $result = $this->object->setDefault($options);
     $this->assertNull($result);
     $this->assertEquals($expected, $this->object->getDefault());
 }
Example #2
0
 /**
  * @param array $options
  * @param string $name
  * @param Factory\AssetFactory $factory
  * @return void
  */
 public function prepareCollection($options, $name, Factory\AssetFactory $factory)
 {
     $assets = isset($options['assets']) ? $options['assets'] : array();
     $filters = isset($options['filters']) ? $options['filters'] : $this->configuration->getDefault()['filters'];
     $options = isset($options['options']) ? $options['options'] : array();
     $options['output'] = isset($options['output']) ? $options['output'] : $name;
     $moveRaw = isset($options['move_raw']) && $options['move_raw'];
     $filters = $this->initFilters($filters);
     $asset = $factory->createAsset($assets, $filters, $options);
     // Allow to move all files 1:1 to new directory
     // its particularly useful when this assets are i.e. images.
     if ($moveRaw) {
         $this->moveRaw($asset);
     } else {
         $asset = $this->cacheAsset($asset);
         $this->assetManager->set($name, $asset);
     }
 }
Example #3
0
 public function getDefaultConfig()
 {
     $defaultDefinition = $this->configuration->getDefault();
     return $defaultDefinition ? $defaultDefinition : [];
 }