function execute() { if (__Request::exists('next')) { $pageType = $this->application->getPageType(); list($moduleName) = explode('.', $pageType); __Request::set('mbTable', $moduleName); $builder = org_glizy_ObjectFactory::createObject('movio.modules.modulesBuilder.builder.Builder'); $builder->executeDelete(); org_glizy_helpers_Navigation::gotoUrl(__Link::makeUrl('link', array('pageId' => 'glizycms_contentsedit'))); } }
public function execute() { $groupId = $this->view->_content->groupId; if (!$groupId) { if ($this->user->isLogged()) { $groupId = $this->user->groupId; } } if ($groupId) { $this->setComponentsAttribute('loginCheck', 'enabled', false); } __Request::set('groupId', $groupId); }
public function execute() { $entityTypeId = $this->view->_content->entitySelect; $visualization = $this->view->loadContent('visualization'); // TODO: migliorare __Request::set('entityTypeId', $entityTypeId); $this->setComponentsAttribute('list', 'entityTypeId', $entityTypeId); $this->setComponentsAttribute('list', 'visualization', $visualization); $showForm = $this->view->loadContent('showForm'); if ('false' === $showForm) { $this->setComponentsVisibility('filters', false); $this->setComponentsAttribute('list', 'title', ''); } }
function init() { $this->defineAttribute('applyFormItemTemplate', false, true, COMPONENT_TYPE_BOOLEAN); $this->defineAttribute('validationType', false, '', COMPONENT_TYPE_STRING); $this->defineAttribute('validationMessage', false, '', COMPONENT_TYPE_STRING); parent::init(); // se c'è un binding lo imposta per poterlo rileggere $name = $this->getAttribute('name'); $name = empty($name) ? $this->getOriginalId() : $name; $bindToField = $this->getAttribute('bindTo'); if (!empty($bindToField) && !__Request::exists($bindToField)) { __Request::set($bindToField, __Request::get($name)); } if (!$this->_application->isAdmin()) { $this->addValidatorClass(); } }
/** * Init * * @return void * @access public */ function init() { $this->acceptOutput = true; $this->overrideEditableRegion = false; $this->canCallController = false; // define the custom attributes //$this->defineAttribute('actionName', false, 'action', COMPONENT_TYPE_STRING); $this->defineAttribute('defaultAction', false, 'index', COMPONENT_TYPE_STRING); $this->defineAttribute('baseClassPath', false, '', COMPONENT_TYPE_STRING); $this->defineAttribute('controllerName', false, '', COMPONENT_TYPE_STRING); // call the superclass for validate the attributes parent::init(); $this->actionName = $this->getAttribute('actionName'); if (__Request::get($this->actionName, '') == '') { __Request::set($this->actionName, $this->getAttribute('defaultAction')); } }
protected function getEditForm($pageId, $formId = 'editForm', $formAction = 'edit') { $oldAction = __Request::get('action'); __Request::set('action', $formAction); $application = org_glizy_ObjectValues::get('org.glizy', 'application'); $originalRootComponent = $application->getRootComponent(); $siteMap = $application->getSiteMap(); $siteMapNode = $siteMap->getNodeById($pageId); $pageType = $siteMapNode->getAttribute('pageType'); $path = org_glizy_Paths::get('APPLICATION_PAGETYPE'); $templatePath = org_glizycms_Glizycms::getSiteTemplatePath(); $options = array('skipImport' => true, 'pathTemplate' => $templatePath, 'mode' => 'edit'); $pageTypeObj =& org_glizy_ObjectFactory::createPage($application, $pageType, $path, $options); $rootComponent = $application->getRootComponent(); $rootComponent->init(); $application->_rootComponent =& $originalRootComponent; __Request::set('action', $oldAction); return $rootComponent->getComponentById($formId); }
function loadContent($name, $bindToField = NULL, $value = NULL) { if (empty($bindToField)) { $bindToField = $name; } if ($this->_command == 'RESET') { $this->_filters[$bindToField] = ''; } else { if ($this->getAttribute('rememberValues')) { $defValue = !is_null($this->sessionEx) ? $this->sessionEx->get($name, '') : ''; $this->_filters[$bindToField] = org_glizy_Request::get($name, $defValue); } else { $this->_filters[$bindToField] = org_glizy_Request::get($name, ''); } } if (!is_null($this->sessionEx)) { $this->sessionEx->set($name, $this->_filters[$bindToField], $this->rememberMode); } if ($this->getAttribute('setRequest')) { __Request::set($name, $this->_filters[$bindToField]); } return $this->_filters[$bindToField]; }
function execute_edit($oldState) { $id = __Request::get('dataGridEdit_recordId'); if ($id && strtolower(__Request::get('action', '')) != 'next') { $ar = org_glizy_ObjectFactory::createModel('org.glizycms.roleManager.models.Role'); $ar->load($id); __Request::set('roleId', $ar->role_id); __Request::set('roleName', $ar->role_name); __Request::set('roleActive', $ar->role_active); __Request::set('permissions', $ar->role_permissions); $groups = array(); $it = org_glizy_ObjectFactory::createModelIterator('org.glizycms.roleManager.models.Group', 'getGroups', array('params' => array('roleId' => $id))); foreach ($it as $ar) { $groups[] = array('id' => $ar->join_FK_dest_id, 'text' => $ar->usergroup_name); } $users = array(); $it = org_glizy_ObjectFactory::createModelIterator('org.glizycms.roleManager.models.User', 'getUsers', array('params' => array('roleId' => $id))); foreach ($it as $ar) { $users[] = array('id' => $ar->join_FK_dest_id, 'text' => $ar->user_loginId); } __Request::set('groups', $groups); __Request::set('users', $users); } }
function executeLater_step3new($oldState) { // controlla se � stato fatto submit if (strtolower(__Request::get('action', '')) == 'next') { $fieldOrder = __Request::get('fieldOrder'); __Request::set('fieldName', explode(',', $fieldOrder)); $mbName = __Request::get('mbName'); __Request::set('mbTable', $this->getModuleName($mbName)); __Request::set('mbModuleType', 'document'); $builder = org_glizy_ObjectFactory::createObject('movio.modules.modulesBuilder.builder.Builder'); $builder->execute(); $this->_parent->refreshToState('step4'); } }
public function execute() { $entityTypeId = $this->view->_content->entitySelect; __Request::set('entityTypeId', $entityTypeId); }
function _readPageId() { __Request::set('pageId', 'Index'); parent::_readPageId(); }
/** * @param org_glizy_components_Component $targetComponent * * @return array */ private function processAjaxCallController($targetComponent) { if (__Request::exists('controllerName')) { $targetComponent->setAttribute('controllerName', __Request::get('controllerName')); } $result = array('status' => false); $r = $targetComponent->callController(); if ($r !== null && $r !== false) { if ($targetComponent->controllerDirectOutput()) { return $r; } $result['status'] = true; if (is_array($r) && isset($r['error'])) { $result['status'] = false; $result['error'] = $r['error']; return $result; } $outputFormatInHtml = false; $html = ''; if (is_array($r) && isset($r['sendOutput'])) { // controlla se c'è renderizzare dei componenti da mandare all'output __Request::set('action', isset($r['sendOutputState']) ? $r['sendOutputState'] : ''); $outputFormatInHtml = isset($r['sendOutputFormat']) && $r['sendOutputFormat'] == 'html'; $this->_rootComponent->process(); $componentsId = $r['sendOutput']; unset($r['sendOutput']); unset($r['sendOutputState']); if (!is_array($componentsId)) { $componentsId = array($componentsId); } foreach ($componentsId as $id) { $c = $this->_rootComponent->getComponentById($id); if (is_object($c)) { $this->_rootComponent->_output = array(); $c->render(); //$r[ 'sendOutput' ][ $id ] = $this->_output[ 0 ][ 'code' ]; $r[$id] = ''; foreach ($this->_rootComponent->_output as $o) { if (strpos($o['editableRegion'], '__') !== false) { continue; } $r[$id] .= $o['code']; $html .= $o['code']; } } } } if ($outputFormatInHtml) { $result['html'] = $html; } else { $result['result'] = $r; } } return $result; }