public function ListDisplays()
 {
     AssetLoadManager::register('tableList');
     $t_display = new ca_bundle_displays();
     $this->view->setVar('t_display', $t_display);
     $this->view->setVar('display_list', $va_displays = caExtractValuesByUserLocale($t_display->getBundleDisplays(array('user_id' => $this->request->getUserID(), 'access' => __CA_BUNDLE_DISPLAY_EDIT_ACCESS__)), null, null, array()));
     $o_result_context = new ResultContext($this->request, 'ca_bundle_displays', 'basic_search');
     $o_result_context->setAsLastFind();
     $o_result_context->setResultList(is_array($va_displays) ? array_keys($va_displays) : array());
     $o_result_context->saveContext();
     $this->view->setVar('table_list', caFilterTableList($t_display->getFieldInfo('table_num', 'BOUNDS_CHOICE_LIST')));
     $this->render('bundle_display_list_html.php');
 }
 public function ListForms()
 {
     AssetLoadManager::register('tableList');
     $t_form = new ca_search_forms();
     $this->view->setVar('t_form', $t_form);
     $this->view->setVar('form_list', $va_forms = caExtractValuesByUserLocale($t_form->getForms(array('user_id' => $this->request->getUserID(), 'access' => __CA_SEARCH_FORM_EDIT_ACCESS__)), null, null, array()));
     $o_result_context = new ResultContext($this->request, 'ca_search_forms', 'basic_search');
     $o_result_context->setAsLastFind();
     $o_result_context->setResultList(is_array($va_forms) ? array_keys($va_forms) : array());
     $o_result_context->saveContext();
     $this->view->setVar('table_list', caFilterTableList($t_form->getFieldInfo('table_num', 'BOUNDS_CHOICE_LIST')));
     $this->render('search_form_list_html.php');
 }
Exemplo n.º 3
0
 public function ListSets()
 {
     AssetLoadManager::register('tableList');
     $o_result_context = new ResultContext($this->request, 'ca_sets', 'basic_search');
     $t_set = new ca_sets();
     $this->view->setVar('t_set', $t_set);
     $vn_user_id = !(bool) $this->request->config->get('ca_sets_all_users_see_all_sets') ? $this->request->getUserID() : null;
     if ($this->request->user->canDoAction('is_administrator') || $this->request->user->canDoAction('can_administrate_sets')) {
         $ps_mode = $this->request->getParameter('mode', pString);
         if (strlen($ps_mode) > 0) {
             $pn_mode = (int) $ps_mode;
             $o_result_context->setParameter('set_display_mode', $pn_mode);
         } else {
             $pn_mode = (int) $o_result_context->getParameter('set_display_mode');
         }
         switch ($pn_mode) {
             case 0:
             default:
                 $va_set_list = caExtractValuesByUserLocale($t_set->getSets(array('user_id' => $vn_user_id, 'access' => __CA_SET_EDIT_ACCESS__)), null, null, array());
                 break;
             case 1:
                 $va_set_list = caExtractValuesByUserLocale($t_set->getSets(array('user_id' => $vn_user_id, 'allUsers' => true)), null, null, array());
                 break;
             case 2:
                 $va_set_list = caExtractValuesByUserLocale($t_set->getSets(array('user_id' => $vn_user_id, 'publicUsers' => true)), null, null, array());
                 break;
         }
     } else {
         $va_set_list = caExtractValuesByUserLocale($t_set->getSets(array('user_id' => $vn_user_id, 'access' => __CA_SET_EDIT_ACCESS__)), null, null, array());
     }
     if ($va_set_list) {
         foreach ($va_set_list as $id => $va_set) {
             $va_set_list[$id]['can_delete'] = $this->UserCanDeleteSet($va_set['user_id']);
         }
     }
     $this->view->setVar('mode', $pn_mode);
     $this->view->setVar('set_list', $va_set_list);
     // get content types for sets
     $this->view->setVar('table_list', caFilterTableList($t_set->getFieldInfo('table_num', 'BOUNDS_CHOICE_LIST')));
     $o_result_context->setAsLastFind();
     $o_result_context->setResultList(array_keys($va_set_list));
     $o_result_context->saveContext();
     $this->render('set_list_html.php');
 }
Exemplo n.º 4
0
 /**
  *
  */
 public function ListUIs()
 {
     AssetLoadManager::register('tableList');
     $this->checkConfiguration();
     $vo_dm = Datamodel::load();
     $va_uis = ca_editor_uis::getUIList(null);
     foreach ($va_uis as $vs_key => $va_ui) {
         if (!($t_instance = $vo_dm->getInstanceByTableNum($va_ui['editor_type'], true))) {
             continue;
         }
         $va_uis[$vs_key]['editor_type'] = $t_instance->getProperty('NAME_PLURAL');
     }
     $this->view->setVar('editor_ui_list', $va_uis);
     $o_result_context = new ResultContext($this->request, $this->ops_table_name, 'basic_search');
     $o_result_context->setResultList(array_keys($va_uis));
     $o_result_context->setAsLastFind();
     $o_result_context->saveContext();
     $t_ui = new ca_editor_uis();
     $this->view->setVar('table_list', caFilterTableList($t_ui->getFieldInfo('editor_type', 'BOUNDS_CHOICE_LIST')));
     return $this->render('ui_list_html.php');
 }
 public function __construct($pn_id = null)
 {
     // Filter list of tables display can be used for to those enabled in current config
     BaseModel::$s_ca_models_definitions['ca_bundle_displays']['FIELDS']['table_num']['BOUNDS_CHOICE_LIST'] = caFilterTableList(BaseModel::$s_ca_models_definitions['ca_bundle_displays']['FIELDS']['table_num']['BOUNDS_CHOICE_LIST']);
     global $_ca_bundle_displays_settings;
     parent::__construct($pn_id);
     //
     $this->SETTINGS = new ModelSettings($this, 'settings', $_ca_bundle_displays_settings);
 }
Exemplo n.º 6
0
 public function __construct($pn_id = null)
 {
     // Filter list of tables set can be used for to those enabled in current config
     BaseModel::$s_ca_models_definitions['ca_sets']['FIELDS']['table_num']['BOUNDS_CHOICE_LIST'] = caFilterTableList(BaseModel::$s_ca_models_definitions['ca_sets']['FIELDS']['table_num']['BOUNDS_CHOICE_LIST']);
     parent::__construct($pn_id);
     # call superclass constructor
 }
Exemplo n.º 7
0
 public function __construct($pn_id = null)
 {
     global $_ca_search_forms_settings;
     // Filter list of tables form can be used for to those enabled in current config
     BaseModel::$s_ca_models_definitions['ca_search_forms']['FIELDS']['table_num']['BOUNDS_CHOICE_LIST'] = caFilterTableList(BaseModel::$s_ca_models_definitions['ca_search_forms']['FIELDS']['table_num']['BOUNDS_CHOICE_LIST']);
     parent::__construct($pn_id);
     # call superclass constructor
     $this->opo_search_config = Configuration::load($this->_CONFIG->get("search_config"));
     $this->opo_search_indexing_config = Configuration::load($this->opo_search_config->get("search_indexing_config"));
     $this->SETTINGS = new ModelSettings($this, 'settings', $_ca_search_forms_settings);
 }
Exemplo n.º 8
0
 public function __construct($pn_id = null)
 {
     // Filter list of tables importers can be used for to those enabled in current config
     BaseModel::$s_ca_models_definitions['ca_data_importers']['FIELDS']['table_num']['BOUNDS_CHOICE_LIST'] = caFilterTableList(BaseModel::$s_ca_models_definitions['ca_data_importers']['FIELDS']['table_num']['BOUNDS_CHOICE_LIST']);
     parent::__construct($pn_id);
     $this->initSettings();
 }
 /**
  * 
  */
 public function __construct($pn_id = null, $pb_filter_tables = false)
 {
     global $_ca_metadata_type_restriction_settings;
     parent::__construct($pn_id);
     # call superclass constructor
     //
     $this->SETTINGS = new ModelSettings($this, 'settings', $_ca_metadata_type_restriction_settings);
     if (!ca_metadata_type_restrictions::$s_loaded_relationship_tables) {
         require_once __CA_MODELS_DIR__ . '/ca_relationship_types.php';
         $t_rel = new ca_relationship_types();
         $va_rels = $t_rel->getRelationshipsUsingTypes();
         $o_dm = Datamodel::load();
         foreach ($va_rels as $vn_table_num => $va_rel_table_info) {
             BaseModel::$s_ca_models_definitions['ca_metadata_type_restrictions']['FIELDS']['table_num']['BOUNDS_CHOICE_LIST'][$va_rel_table_info['name']] = $vn_table_num;
         }
         if ($pb_filter_tables) {
             BaseModel::$s_ca_models_definitions['ca_metadata_type_restrictions']['FIELDS']['table_num']['BOUNDS_CHOICE_LIST'] = caFilterTableList(BaseModel::$s_ca_models_definitions['ca_metadata_type_restrictions']['FIELDS']['table_num']['BOUNDS_CHOICE_LIST'], array('sort' => true));
         }
         ca_metadata_type_restrictions::$s_loaded_relationship_tables = true;
     }
 }