Esempio n. 1
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function init()
 {
     $this->defineAttribute('cssClass', false, '', COMPONENT_TYPE_STRING);
     $this->defineAttribute('showWelcome', false, true, COMPONENT_TYPE_BOOLEAN);
     $this->acceptOutput = true;
     parent::init();
 }
Esempio n. 2
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function init()
 {
     // define the custom attributes
     $this->defineAttribute('width', false, '40%', COMPONENT_TYPE_STRING);
     // call the superclass for validate the attributes
     parent::init();
 }
Esempio n. 3
0
 function process()
 {
     $this->recordId = org_glizy_Request::get($this->getAttribute('idName'), NULL);
     if (is_null($this->recordId)) {
         return;
     }
     $dataProvider =& $this->getAttribute('dataProvider');
     if ($dataProvider) {
         $this->ar = $dataProvider->load($this->recordId);
         $processCell = org_glizy_ObjectFactory::createObject($this->getAttribute('processCell'), $this->_application);
         if ($processCell) {
             $ar =& $this->ar;
             call_user_func_array(array($processCell, 'renderCell'), array($ar, $this->getAttribute('processCellParams')));
         }
         $this->_content = org_glizy_ObjectFactory::createObject('org.glizy.components.RecordDetailVO', $this->ar);
         $ogTitle = $this->getAttribute('ogTitle');
         if ($ogTitle) {
             org_glizy_ObjectValues::set('org.glizy.og', 'title', $this->ar->{$ogTitle});
             if ($this->getAttribute('modifyBreadcrumbs')) {
                 $evt = array('type' => GLZ_EVT_BREADCRUMBS_UPDATE, 'data' => $this->ar->{$ogTitle});
                 $this->dispatchEvent($evt);
                 $evt = array('type' => GLZ_EVT_PAGETITLE_UPDATE, 'data' => $this->ar->{$ogTitle});
                 $this->dispatchEvent($evt);
             }
         }
         // TODO controllare che i dati siano stati caricati correttamento
     } else {
         // TODO generare errore, dataprovider non valid
     }
     $this->_content->__url__ = !is_null($this->getAttribute('routeUrl')) ? org_glizy_helpers_Link::makeURL($this->getAttribute('routeUrl'), $this->_content) : '';
     parent::process();
 }
Esempio n. 4
0
 function init()
 {
     $this->defineAttribute('cssClass', false, null, COMPONENT_TYPE_STRING);
     $this->defineAttribute('title', false, null, COMPONENT_TYPE_STRING);
     $this->defineAttribute('titleTag', false, 'h3', COMPONENT_TYPE_STRING);
     parent::init();
 }
Esempio n. 5
0
 function render($mode)
 {
     if (!$this->_application->isAdmin()) {
         $this->setAttribute('skin', 'DictionaryList.html');
     }
     parent::render($mode);
 }
Esempio n. 6
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function init()
 {
     // define the custom attributes
     $this->defineAttribute('name', true, '', COMPONENT_TYPE_STRING);
     $this->defineAttribute('forceChildCreation', false, NULL, COMPONENT_TYPE_BOOLEAN);
     // call the superclass for validate the attributes
     parent::init();
 }
Esempio n. 7
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function init()
 {
     // define the custom attributes
     $this->defineAttribute('id', false, NULL, COMPONENT_TYPE_INTEGER);
     $this->defineAttribute('target', false, NULL, COMPONENT_TYPE_OBJECT);
     // call the superclass for validate the attributes
     parent::init();
 }
Esempio n. 8
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function init()
 {
     $this->canHaveChilds = true;
     $this->overrideEditableRegion = false;
     // define the custom attributes
     $this->defineAttribute('adm:editComponents', false, array(), COMPONENT_TYPE_ENUM);
     // call the superclass for validate the attributes
     parent::init();
 }
Esempio n. 9
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function init()
 {
     // define the custom attributes
     $this->defineAttribute('cssClass', false, NULL, COMPONENT_TYPE_STRING);
     $this->defineAttribute('attributeToSelect', false, 'id', COMPONENT_TYPE_STRING);
     $this->defineAttribute('cssClassCurrent', false, 'current', COMPONENT_TYPE_STRING);
     // call the superclass for validate the attributes
     parent::init();
 }
Esempio n. 10
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function init()
 {
     // define the custom attributes
     $this->defineAttribute('label', false, NULL, COMPONENT_TYPE_STRING);
     $this->defineAttribute('onlyAdmin', false, false, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('cssClass', false, '', COMPONENT_TYPE_STRING);
     // call the superclass for validate the attributes
     parent::init();
 }
Esempio n. 11
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function init()
 {
     // define the custom attributes
     $this->defineAttribute('label', false, NULL, COMPONENT_TYPE_STRING);
     $this->defineAttribute('required', false, false, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('requiredMessage', false, NULL, COMPONENT_TYPE_STRING);
     // call the superclass for validate the attributes
     parent::init();
 }
Esempio n. 12
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function init()
 {
     $this->defineAttribute('addWrapDiv', false, false, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('cssClass', false, 'nav nav-tabs', COMPONENT_TYPE_STRING);
     $this->defineAttribute('paneCssClass', false, 'tab-content', COMPONENT_TYPE_STRING);
     $this->defineAttribute('showNav', false, false, COMPONENT_TYPE_BOOLEAN);
     // call the superclass for validate the attributes
     parent::init();
 }
Esempio n. 13
0
 function process()
 {
     $template = __Config::get('glizycms.form.buttonsPanel');
     if ($template) {
         list($templateStart, $templateEnd) = explode('##CONTENT##', $template);
         $this->templateStart = str_replace('##ID##', $this->getid(), $templateStart);
         $this->templateEnd = $templateEnd;
     }
     parent::process();
 }
Esempio n. 14
0
 function init()
 {
     // define the custom attributes
     $this->defineAttribute('label', true, '', COMPONENT_TYPE_STRING);
     $this->defineAttribute('cssClass', false, 'tab-pane', COMPONENT_TYPE_STRING);
     $this->defineAttribute('cssClassTab', false, '', COMPONENT_TYPE_STRING);
     $this->defineAttribute('disabled', false, false, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('dropdown', false, false, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('routeUrl', false, NULL, COMPONENT_TYPE_STRING);
     // call the superclass for validate the attributes
     parent::init();
 }
Esempio n. 15
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function init()
 {
     // define the custom attributes
     $this->defineAttribute('customClass', false, '', COMPONENT_TYPE_STRING);
     $this->defineAttribute('defaultState', false, NULL, COMPONENT_TYPE_STRING);
     $this->defineAttribute('rememberState', false, true, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('useIdPrefix', false, false, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('overrideEditableRegion', false, true, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('targetPage', false, NULL, COMPONENT_TYPE_STRING);
     $this->defineAttribute('forceChildCreation', false, NULL, COMPONENT_TYPE_BOOLEAN);
     // call the superclass for validate the attributes
     parent::init();
 }
Esempio n. 16
0
 /**
  * Init
  *
  * @return    void
  * @access    public
  */
 function init()
 {
     // define the custom attributes
     $this->defineAttribute('label', false, NULL, COMPONENT_TYPE_STRING);
     // $this->defineAttribute('start',     false, NULL,     COMPONENT_TYPE_INTEGER);
     // $this->defineAttribute('count',     false, NULL,     COMPONENT_TYPE_INTEGER);
     $this->defineAttribute('newMode', false, false, COMPONENT_TYPE_BOOLEAN);
     // $this->defineAttribute('routeUrl',         false,    NULL,    COMPONENT_TYPE_STRING);
     $this->defineAttribute('adm:min', false, NULL, COMPONENT_TYPE_INTEGER);
     $this->defineAttribute('adm:max', false, NULL, COMPONENT_TYPE_INTEGER);
     $this->defineAttribute('adm:collapsable', false, NULL, COMPONENT_TYPE_INTEGER);
     // call the superclass for validate the attributes
     parent::init();
 }
Esempio n. 17
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function init()
 {
     // define the custom attributes
     $this->defineAttribute('name', true, '', COMPONENT_TYPE_STRING);
     $this->defineAttribute('label', false, '', COMPONENT_TYPE_STRING);
     $this->defineAttribute('url', false, NULL, COMPONENT_TYPE_STRING);
     $this->defineAttribute('draw', false, true, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('backUrl', false, false, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('cssClassTab', false, '', COMPONENT_TYPE_STRING);
     // call the superclass for validate the attributes
     parent::init();
     $this->actionsOriginal = explode(',', $this->getAttribute('name'));
     $this->actions = explode(',', strtolower($this->getAttribute('name')));
 }
Esempio n. 18
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function init()
 {
     $this->acceptOutput = true;
     $this->overrideEditableRegion = false;
     // define the custom attributes
     $this->defineAttribute('defaultEditableRegion', false, 'content', COMPONENT_TYPE_STRING);
     $this->defineAttribute('templateType', false, 'php', COMPONENT_TYPE_STRING);
     $this->defineAttribute('templateFileName', true, NULL, COMPONENT_TYPE_STRING);
     $this->defineAttribute('adm:editComponents', false, array(), COMPONENT_TYPE_ENUM);
     $this->defineAttribute('addCoreJS', false, false, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('allowModulesSnippets', false, false, COMPONENT_TYPE_BOOLEAN);
     // call the superclass for validate the attributes
     parent::init();
 }
Esempio n. 19
0
 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();
     }
 }
Esempio n. 20
0
 /**
  * Init
  *
  * @return    void
  * @access    public
  */
 function init()
 {
     $this->defineAttribute('dataProvider', true, NULL, COMPONENT_TYPE_OBJECT);
     $this->defineAttribute('cssClass', false, 'even,odd', COMPONENT_TYPE_STRING);
     $this->defineAttribute('filters', false, NULL, COMPONENT_TYPE_OBJECT);
     $this->defineAttribute('useQueryParams', false, false, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('paginate', false, NULL, COMPONENT_TYPE_OBJECT);
     $this->defineAttribute('query', false, NULL, COMPONENT_TYPE_STRING);
     $this->defineAttribute('routeUrl', false, NULL, COMPONENT_TYPE_STRING);
     $this->defineAttribute('title', false, '', COMPONENT_TYPE_STRING);
     $this->defineAttribute('processCell', false, '', COMPONENT_TYPE_STRING);
     $this->defineAttribute('processCellParams', false, NULL, COMPONENT_TYPE_STRING);
     $this->defineAttribute('allowEmptySearch', false, true, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('adm:showControl', false, false, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('wrapTagCssClass', false, NULL, COMPONENT_TYPE_STRING);
     $this->defineAttribute('removeTitleWithNoFilter', false, false, COMPONENT_TYPE_BOOLEAN);
     parent::init();
     $this->canHaveChilds = false;
 }
Esempio n. 21
0
 /**
  * @param string $formName
  */
 function addValidateJsCode($formName = null)
 {
     if (!__Config::get('GLIZY_ADD_VALIDATE_JS')) {
         return;
     }
     if (!org_glizy_ObjectValues::get('org.glizy.JS.Validate', 'add', false) && __Config::get('GLIZY_ADD_JS_LIB')) {
         // Validate
         org_glizy_ObjectValues::set('org.glizy.JS.Validate', 'add', true);
         $this->addJSLibCore();
         if (file_exists(org_glizy_Paths::get('STATIC_DIR') . 'jquery/jquery.validationEngine/jquery.validationEngine-' . $this->getLanguage() . '.js')) {
             $this->_rootComponent->addOutputCode(org_glizy_helpers_JS::linkStaticJSfile('jquery/jquery.validationEngine/jquery.validationEngine-' . $this->getLanguage() . '.js'), 'head');
         } else {
             $this->_rootComponent->addOutputCode(org_glizy_helpers_JS::linkStaticJSfile('jquery/jquery.validationEngine/jquery.validationEngine-en.js'), 'head');
         }
         $this->_rootComponent->addOutputCode(org_glizy_helpers_JS::linkStaticJSfile('jquery/jquery.validationEngine/jquery.validationEngine.js'), 'head');
         $this->_rootComponent->addOutputCode(org_glizy_helpers_CSS::linkStaticCSSfile('jquery/jquery.validationEngine/validationEngine.jquery.css'), 'head');
     }
     if (!is_null($formName) && __Config::get('GLIZY_ADD_JS_LIB')) {
         $this->_rootComponent->addOutputCode(org_glizy_helpers_JS::JScode('jQuery(document).ready(function() { $("#' . $formName . '").validationEngine( "attach", { validationEventTrigger: "none", scroll: false, showAllErrors: false } ); });'), 'head');
         //                $this->_rootComponent->addOutputCode(org_glizy_helpers_JS::JScode( '$(document).ready(function() { $("#'.$formName.'").validationEngine(); });' ), 'head');
     }
 }
Esempio n. 22
0
 /**
  * Init
  *
  * @return    void
  * @access    public
  */
 function init()
 {
     // define the custom attributes
     $this->defineAttribute('controller', false, NULL, COMPONENT_TYPE_OBJECT);
     $this->defineAttribute('cssClass', false, '', COMPONENT_TYPE_STRING);
     $this->defineAttribute('tableCssClass', false, 'list', COMPONENT_TYPE_STRING);
     $this->defineAttribute('dataProvider', true, NULL, COMPONENT_TYPE_OBJECT);
     $this->defineAttribute('filters', false, NULL, COMPONENT_TYPE_OBJECT);
     $this->defineAttribute('label', false, '', COMPONENT_TYPE_STRING);
     $this->defineAttribute('paginate', false, NULL, COMPONENT_TYPE_OBJECT);
     $this->defineAttribute('query', false, '', COMPONENT_TYPE_STRING);
     $this->defineAttribute('routeUrl', false, '', COMPONENT_TYPE_STRING);
     $this->defineAttribute('skipOrder', false, false, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('skipGroup', false, true, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('drawHeader', false, true, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('renderRow', false, '', COMPONENT_TYPE_STRING);
     $this->defineAttribute('orderBy', false, NULL, COMPONENT_TYPE_STRING);
     $this->defineAttribute('orderDirection', false, NULL, COMPONENT_TYPE_STRING);
     $this->defineAttribute('hideTotals', false, false, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('allowEmptySearch', false, true, COMPONENT_TYPE_BOOLEAN);
     $this->defineAttribute('emptySearchLabel', false, '', COMPONENT_TYPE_STRING);
     // call the superclass for validate the attributes
     parent::init();
 }
Esempio n. 23
0
 function render($outputMode = NULL, $skipChilds = false)
 {
     if ($this->getAttribute('addValidationJs')) {
         $this->_application->addValidateJsCode($this->getId());
     }
     if (!is_null($this->getAttribute('skin')) && $outputMode == 'html') {
         $this->acceptOutput = true;
         $this->_content = new StdClass();
         for ($i = 0; $i < count($this->childComponents); $i++) {
             if ($this->childComponents[$i]->getAttribute('visible') && $this->childComponents[$i]->getAttribute('enabled')) {
                 $this->currentRenderChildId = $this->childComponents[$i]->getId();
                 $this->_content->{$this->currentRenderChildId} = '';
                 $this->childComponents[$i]->render($outputMode);
                 $this->state = COMPONENT_STATE_RENDER;
                 if ($this->checkBreakCycle()) {
                     $this->state = COMPONENT_STATE_BLOCKED;
                     $this->breakCycle(false);
                     break;
                 }
             }
         }
     }
     parent::render($outputMode, $skipChilds);
 }
Esempio n. 24
0
 function __construct(&$application, &$parent, $tagName = '', $id = '', $originalId = '')
 {
     parent::__construct($application, $parent, $tagName, $id, $originalId);
     $this->canHaveChilds = true;
     $this->overrideEditableRegion = false;
 }
Esempio n. 25
0
 function addOutputCode($output, $editableRegion = '', $atEnd = false)
 {
     if ($editableRegion == 'relationsGraph' || $editableRegion == 'relations' || $editableRegion == 'referenceRelations' || $editableRegion == 'europeanaRelatedContents' || $editableRegion == 'photogallery') {
         if (!property_exists($this->_content['relations'], $editableRegion)) {
             $this->_content['relations']->{$editableRegion} = '';
         }
         $this->_content['relations']->{$editableRegion} .= $output;
         return;
     }
     parent::addOutputCode($output, $editableRegion, $atEnd);
 }
Esempio n. 26
0
 /**
  * Init
  *
  * @return	void
  * @access	public
  */
 function init()
 {
     $this->defineAttribute('cssClass', false, NULL, COMPONENT_TYPE_STRING);
     // call the superclass for validate the attributes
     parent::init();
 }
Esempio n. 27
0
 function render($outputMode = NULL, $skipChilds = false)
 {
     if ($this->_isEnabled || $outputMode != 'html') {
         parent::render($outputMode, $skipChilds);
     }
 }