/** * init() Method to init() normal and add tabbed Navigation */ public function init() { parent::init(); OntoWiki::getInstance()->getNavigation()->disableNavigation(); // provide basic view data $action = $this->_request->getActionName(); $this->view->placeholder('main.window.title')->set('Import Data'); $this->view->formActionUrl = $this->_config->urlBase . 'basicimporter/' . $action; $this->view->formEncoding = 'multipart/form-data'; $this->view->formClass = 'simple-input input-justify-left'; $this->view->formMethod = 'post'; $this->view->formName = 'importdata'; $this->view->supportedFormats = $this->_erfurt->getStore()->getSupportedImportFormats(); if (!$this->isSelectedModelEditable()) { return; } else { $this->_model = $this->_owApp->selectedModel; } // add a standard toolbar $toolbar = $this->_owApp->toolbar; $toolbar->appendButton(OntoWiki_Toolbar::SUBMIT, array('name' => 'Import Data', 'id' => 'importdata'))->appendButton(OntoWiki_Toolbar::RESET, array('name' => 'Cancel', 'id' => 'importdata')); $this->view->placeholder('main.window.toolbar')->set($toolbar); if ($this->_request->isPost()) { $this->_post = $this->_request->getPost(); } }
/** * init() Method to init() normal and add tabbed Navigation */ public function init() { parent::init(); // setup the navigation OntoWiki::getInstance()->getNavigation()->reset(); $tabExist = false; $ow = OntoWiki::getInstance(); if ($this->_privateConfig->general->enabled->saving) { OntoWiki::getInstance()->getNavigation()->register('listquery', array('controller' => 'queries', 'action' => 'listquery', 'name' => 'Saved Queries', 'position' => 0, 'active' => true)); $this->view->headScript()->appendFile($ow->extensionManager->getComponentUrl('queries') . 'resources/savepartial.js'); $tabExist = true; } if ($this->_privateConfig->general->enabled->editor) { OntoWiki::getInstance()->getNavigation()->register('queryeditor', array('controller' => 'queries', 'action' => 'editor', 'name' => 'Query Editor', 'position' => 1, 'active' => false)); $tabExist = true; } if ($this->_privateConfig->general->enabled->builder) { OntoWiki::getInstance()->getNavigation()->register('savedqueries', array('controller' => 'queries', 'action' => 'manage', 'name' => 'Query Builder ', 'position' => 2, 'active' => false)); $tabExist = true; } if (!$tabExist) { OntoWiki::getInstance()->getNavigation()->disableNavigation(); } $user = $this->_erfurt->getAuth()->getIdentity(); $this->_userUri = $user->getUri(); $this->_userName = $user->getUsername(); $this->_userDbUri = $this->_privateConfig->saving->baseQueryDbUri . 'user-' . $this->_userName . '/'; }
public function init() { parent::init(); $this->_helper->viewRenderer->setNoRender(); $this->_helper->layout()->disableLayout(); $this->_relativeTemplatePath = $this->_owApp->extensionManager->getExtensionConfig('site')->templates; }
public function init() { // init component parent::init(); $this->view->headScript()->appendFile($this->_componentUrlBase . 'scripts/csvimport.js'); $this->view->headScript()->appendFile($this->_componentUrlBase . 'scripts/rdfa.object.js'); }
public function init() { parent::init(); $this->_helper->viewRenderer->setNoRender(); $this->_helper->layout()->disableLayout(); $this->_server = new Zend_Json_Server(); }
/** * Constructor */ public function init() { // this provides many std controller vars and other stuff ... parent::init(); // init controller variables $this->store = $this->_owApp->erfurt->getStore(); $this->_config = $this->_owApp->config; $this->response = Zend_Controller_Front::getInstance()->getResponse(); $this->request = Zend_Controller_Front::getInstance()->getRequest(); }
public function init() { parent::init(); $loader = Zend_Loader_Autoloader::getInstance(); $loader->registerNamespace('CubeViz_'); $loader->registerNamespace('DataCube_'); $path = __DIR__; set_include_path(get_include_path() . PATH_SEPARATOR . $path . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . PATH_SEPARATOR); // limit dimension element number $this->_dimensionElementLimit = 0 < (int) $this->_privateConfig->get('dimensionElementLimit') ? $this->_privateConfig->get('dimensionElementLimit') : 100; // max number of result entries to use title helper $this->_titleHelperLimit = 0 < (int) $this->_privateConfig->get('titleHelperLimit') ? $this->_privateConfig->get('titleHelperLimit') : 400; }
/** * inits the controller (e.g. for getting the config) * * @return void */ public function init() { parent::init(); // Disable layout (we want only output xml) $this->_helper->layout->disableLayout(); // Needed here because of the automatic rendering should be deactivated //$this->_helper->viewRenderer->setNoRender(true); // Add the path of templates needed by this plugin //$this->view->addScriptPath(REAL_BASE.'plugins/SemanticSitemap/templates/'); // get the default store from the registry $this->_store = Erfurt_App::getInstance()->getStore(); // fetch the modellist from the store $this->_models = $this->_store->getAvailableModels(); // todo: where to set the content type? currently we get a Quirks mode :-( $this->_response->setRawHeader('Content-Type: application/xml'); }
public function init() { parent::init(); // m is automatically used and selected if (!isset($this->_request->m) && !$this->_owApp->selectedModel) { require_once 'OntoWiki/Exception.php'; throw new OntoWiki_Exception('No model pre-selected and missing parameter m (model)!'); } else { $this->_model = $this->_owApp->selectedModel; } // disable tabs require_once 'OntoWiki/Navigation.php'; OntoWiki::getInstance()->getNavigation()->disableNavigation(); // get translation object $this->_translate = $this->_owApp->translate; $this->queryString = $this->_request->getParam('query', ''); $this->queryLabel = $this->_request->getParam('label', ''); //set title of main window ... $this->view->placeholder('main.window.title')->set($this->queryLabel); }
public function init() { parent::init(); $this->_store = $this->_owApp->erfurt->getStore(); $this->_translate = $this->_owApp->translate; $this->_ac = $this->_erfurt->getAc(); $sessionKey = 'Navigation' . (isset($config->session->identifier) ? $config->session->identifier : ''); $this->stateSession = new Zend_Session_Namespace($sessionKey); $this->_model = $this->_owApp->selectedModel; if (isset($this->_request->m)) { $this->_model = $_store->getModel($this->_request->m); } if (empty($this->_model)) { throw new OntoWiki_Exception('Missing parameter m (model) and no selected model in session!'); } // create title helper $this->titleHelper = new OntoWiki_Model_TitleHelper($this->_model); // Model Based Access Control if (!$this->_ac->isModelAllowed('view', $this->_model->getModelIri())) { throw new Erfurt_Ac_Exception('You are not allowed to read this model.'); } }
public function init() { parent::init(); $nav = OntoWiki::getInstance()->getNavigation(); $nav->reset(); $nav->register('list', array('route' => null, 'action' => 'list', 'controller' => 'exconf', 'name' => 'Locally Installed')); $nav->register('repo', array('route' => null, 'action' => 'explorerepo', 'controller' => 'exconf', 'name' => 'Install / Upgrade from Repo')); $ow = OntoWiki::getInstance(); $modMan = $ow->extensionManager; //determine how to write to the filesystem if (!is_writeable($modMan->getExtensionPath())) { $con = $this->ftpConnect(); if ($con->connection == null) { $this->_folderWriteable = false; $this->_connection = false; $this->_sftp = false; } else { $this->_useFtp = true; $this->_connection = $con->connection; $this->_sftp = $con->sftp; } } }
public function init() { parent::init(); $this->_syncModelUri = $this->_privateConfig->syncModelUri; $this->_syncModelHelperBase = $this->_privateConfig->syncModelHelperBase; //$this->_properties = $this->_privateConfig->properties->toArray(); // For testability we reset the wrapper registry first, since // multiple calls of this method would fail otherwise. Erfurt_Wrapper_Registry::reset(); $this->_wrapperRegisty = Erfurt_Wrapper_Registry::getInstance(); $owApp = OntoWiki::getInstance(); if (null !== $owApp->selectedModel) { $this->_graphUri = $owApp->selectedModel->getModelIri(); } else { if (isset($this->_request->m)) { $this->_graphUri = $this->_request->m; } } }
public function init() { parent::init(); }