Controller_Addon::addLocation PHP Метод

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

This defines the location data for the add-on. Call this method explicitly from init() if necessary.
public addLocation ( $contents, $public_contents = null )
    public function addLocation($contents, $public_contents = null)
    {
        $this->location = $this->app->pathfinder->addLocation($contents);
        $this->location->setBasePath($this->addon_base_path);
        // If class has assets, those have probably been installed
        // into the public location
        // TODO: test
        if ($this->has_assets) {
            if (is_null($public_contents)) {
                $public_contents = array('public' => '.', 'js' => 'js', 'css' => 'css');
            }
            $this->location = $this->app->pathfinder->public_location->addRelativeLocation($this->addon_base_path, $contents);
        }
        return $this->location;
    }