當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ca_sets::getAccessExpirationDates方法代碼示例

本文整理匯總了PHP中ca_sets::getAccessExpirationDates方法的典型用法代碼示例。如果您正苦於以下問題:PHP ca_sets::getAccessExpirationDates方法的具體用法?PHP ca_sets::getAccessExpirationDates怎麽用?PHP ca_sets::getAccessExpirationDates使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ca_sets的用法示例。


在下文中一共展示了ca_sets::getAccessExpirationDates方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: displaySet

 public function displaySet()
 {
     # --- set info
     $t_set = new ca_sets($pn_set_id = $this->request->getParameter('set_id', pInteger));
     if (!$t_set->getPrimaryKey()) {
         $this->notification->addNotification(_t("This set does not exist"), "message");
         $this->response->setRedirect(caNavUrl($this->request, "", "", "", ""));
         return;
     }
     $va_access_values = caGetUserAccessValues($this->request);
     # Enforce access control
     if (sizeof($va_access_values) && !in_array($t_set->get("access"), $va_access_values)) {
         $this->notification->addNotification(_t("This set is not available for view"), "message");
         $this->response->setRedirect(caNavUrl($this->request, "", "", "", ""));
         return;
     }
     if (!$t_set->haveAccessToSet($this->request->getUserID(), __CA_SET_READ_ACCESS__)) {
         $this->notification->addNotification(_t("This set is not available for view"), "message");
         $this->response->setRedirect(caNavUrl($this->request, "", "", "", ""));
         return;
     }
     $this->view->setVar('t_set', $t_set);
     $va_items = caExtractValuesByUserLocale($t_set->getItems(array('thumbnailVersions' => array('widepreview', 'medium'), 'access' => __CA_SET_READ_ACCESS__, "checkAccess" => $va_access_values, 'user_id' => $this->request->getUserID())));
     $this->view->setVar('items', $va_items);
     $va_row_ids = array();
     foreach ($va_items as $vn_item_id => $va_item_info) {
         $va_row_ids[] = $va_item_info['row_id'];
     }
     # --- all featured sets - for display in right hand column
     // get sets for public display
     $t_list = new ca_lists();
     $vn_public_set_type_id = $t_list->getItemIDFromList('set_types', $t_list->getAppConfig()->get('bristol_set_type'));
     $t_set = new ca_sets($pn_set_id);
     $va_sets = caExtractValuesByUserLocale($t_set->getSets(array('table' => 'ca_objects', 'access' => __CA_SET_READ_ACCESS__, 'setType' => $vn_public_set_type_id, 'user_id' => $this->request->getUserID())));
     $va_set_first_items = array();
     $va_set_first_items = $t_set->getFirstItemsFromSets(array_keys($va_sets), array("version" => "icon", "checkAccess" => $va_access_values));
     $this->view->setVar('sets', $va_sets);
     $this->view->setVar('first_items_from_sets', $va_set_first_items);
     $this->view->setVar('set_title', $t_set->getLabelForDisplay());
     $this->view->setVar('set_description', $t_set->get($this->opo_plugin_config->get('set_description_element_code'), array('convertLinkBreaks' => true)));
     $this->view->setVar('set_creator', $t_set->get('setcreator', array('convertLinkBreaks' => true)));
     $this->view->setVar('set_date', $t_set->get('setdate', array('convertLinkBreaks' => true)));
     $va_exp_dates = $t_set->getAccessExpirationDates($this->request->getUserID(), __CA_SET_READ_ACCESS__, $pn_set_id);
     $this->view->setVar('set_expiration_date', $va_exp_dates[$pn_set_id]);
     // Needed to figure out what result context to use on details
     $this->opo_result_context->setParameter('set_id', $pn_set_id);
     $this->opo_result_context->setResultList($va_row_ids);
     $this->opo_result_context->setAsLastFind();
     $this->opo_result_context->saveContext();
     $this->render($this->ops_theme . '/set_info_html.php');
 }
開發者ID:guaykuru,項目名稱:pawtucket,代碼行數:51,代碼來源:ShowController.php


注:本文中的ca_sets::getAccessExpirationDates方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。