/**
  * Overrides load() to initialize bundle specifications
  */
 public function load($pm_id = null, $pb_use_cache = true)
 {
     global $AUTH_CURRENT_USER_ID;
     $vn_rc = parent::load($pm_id, $pb_use_cache);
     if ($this->getAppConfig()->get('perform_item_level_access_checking')) {
         if ($this->checkACLAccessForUser(new ca_users($AUTH_CURRENT_USER_ID)) == __CA_ACL_NO_ACCESS__) {
             $this->clear();
             return false;
         }
     }
     $this->initLabelDefinitions();
     if ($this->isHierarchical() && $this->opo_idno_plugin_instance) {
         $this->opo_idno_plugin_instance->isChild(($vs_parent_id_fld = $this->getProperty('HIERARCHY_PARENT_ID_FLD')) && $this->get($vs_parent_id_fld) > 0 ? true : false);
     }
     return $vn_rc;
 }
Exemplo n.º 2
0
 public function load($pm_id = null, $pb_use_cache = true)
 {
     if ($vn_rc = parent::load($pm_id)) {
         if (!isset(ca_metadata_elements::$s_settings_cache[$this->getPrimaryKey()])) {
             ca_metadata_elements::$s_settings_cache[$this->getPrimaryKey()] = $this->get('settings');
         }
     }
     return $vn_rc;
 }
Exemplo n.º 3
0
 public function load($pm_id = null, $pb_use_cache = true)
 {
     if ($vn_rc = parent::load($pm_id, $pb_use_cache)) {
         if (!MemoryCache::contains($this->getPrimaryKey(), 'ElementSettings')) {
             MemoryCache::save($this->getPrimaryKey(), $this->get('settings'), 'ElementSettings');
         }
     }
     return $vn_rc;
 }