Beispiel #1
0
 /**
  * Initializes the options for the object
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param   Library\ObjectConfig $config Configuration options
  * @return  void
  */
 protected function _initialize(Library\ObjectConfig $config)
 {
     //Make asset paths absolute
     $base = $this->getObject('request')->getBaseUrl();
     $path = $this->getObject('request')->getBaseUrl()->getPath() . '/assets/';
     $config->append(array('priority' => self::PRIORITY_LOW, 'aliases' => array('"/assets/' => '"' . $path)));
     parent::_initialize($config);
 }
Beispiel #2
0
 /**
  * Initializes the options for the object
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param   Library\ObjectConfig $config Configuration options
  * @return  void
  */
 protected function _initialize(Library\ObjectConfig $config)
 {
     //Make images paths absolute
     $base = $this->getObject('request')->getBaseUrl();
     $site = $this->getObject('application')->getSite();
     $path = $base->getPath() . '/files/' . $site . '/files/';
     $config->append(array('aliases' => array('files://' => $path, '"files/' => '"' . $path)));
     parent::_initialize($config);
 }