本文整理汇总了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');
}