Controller_Addon::init PHP Method

init() public method

???
public init ( )
    public function init()
    {
        parent::init();
        $this->app->requires('atk', $this->atk_version);
        if (!$this->addon_name) {
            throw $this->exception('Addon name must be specified in it\'s Controller');
        }
        $this->namespace = substr(get_class($this), 0, strrpos(get_class($this), '\\'));
        $this->addon_base_path = $this->app->locatePath('addons', $this->namespace);
        if (count($this->addon_private_locations) || count($this->addon_public_locations)) {
            $this->addAddonLocations($this->base_path);
        }
    }

Usage Example

Example #1
0
 function init()
 {
     parent::init();
     $this->setConfigs();
     $this->addTranslator();
     $this->api->addHook('localizeString', array($this, '_'));
 }
All Usage Examples Of Controller_Addon::init