/** * (non-PHPdoc) * @see AppKitBaseModel::initialize() */ public function initialize(AgaviContext $context, array $parameters = array()) { $parameters = $parameters + $this->parameters_default; parent::initialize($context, $parameters); $this->initializeProvider(); $this->log('Auth.Provider: Object (name=%s) initialized', $this->getProviderName(), AgaviLogger::DEBUG); }
public function initialize(AgaviContext $ctx, array $parameters = array()) { parent::initialize($ctx, $parameters); $this->dqlViews = (include AgaviConfigCache::checkConfig(AgaviToolkit::expandDirectives('%core.module_dir%/Api/config/views.xml'))); $this->view = $parameters["view"]; $this->viewParameters = isset($parameters["parameters"]) ? $parameters["parameters"] : array(); $this->validateTarget(); $connection = $this->defaultConnection; if (isset($parameters["connection"])) { $connection = $parameters["connection"]; } if ($this->view["connection"]) { $connection = $this->view["connection"]; } AppKitLogger::verbose("Switching to connection %s", $connection); $db = $this->getContext()->getDatabaseManager()->getDatabase($connection); $this->useRetained = $db->useRetained(); $this->connection = $ctx->getDatabaseConnection($connection); if ($this->connection != "icinga") { $ctx->getModel("DBALMetaManager", "Api")->switchIcingaDatabase($connection); } $this->user = $this->getContext()->getUser()->getNsmUser(); $this->parseBaseDQL(); $this->parseCustomVariables(); $this->parseDQLExtensions(); $this->parseDependencies(); }
/** * Initializes the module and calls setupModifers if parameters doesn't contain "noStoreModifierSetup" * @param AgaviContext The context of the agavi instance * @param Array An array of submitted parameters * - AgaviRequestDataHolder request : the request information * - noStoreModifierSetup : Don't setup modifiers (add when callin parent::initialize) * * @author Jannis Moßhammer <*****@*****.**> **/ public function initialize(AgaviContext $context, array $parameters = array()) { parent::initialize($context, $parameters); $this->defaultInitialize($context, $parameters); }
public function initialize(AgaviContext $context, array $parameters = array()) { parent::initialize($context, $parameters); $this->applyJasperConfigToParameters($this->getParameter('jasperconfig')); }