本文整理汇总了PHP中ca_sets::getItemIDs方法的典型用法代码示例。如果您正苦于以下问题:PHP ca_sets::getItemIDs方法的具体用法?PHP ca_sets::getItemIDs怎么用?PHP ca_sets::getItemIDs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ca_sets
的用法示例。
在下文中一共展示了ca_sets::getItemIDs方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setItemInfo
public function setItemInfo()
{
$va_access_values = caGetUserAccessValues($this->request);
$pn_set_id = $this->request->getParameter('set_id', pInteger);
$t_set = new ca_sets($pn_set_id);
$this->view->setVar('set_id', $pn_set_id);
$pn_set_item_id = $this->request->getParameter('set_item_id', pInteger);
$t_set_item = new ca_set_items($pn_set_item_id);
$va_set_item_info = array();
$va_items = $t_set->getItemIDs(array("checkAccess" => $va_access_values));
$pn_previous_id = "";
foreach ($va_items as $vn_item_id => $va_item_info) {
if ($va_set_item_info["item_id"]) {
$va_set_item_info["next_id"] = $vn_item_id;
break;
}
if ($pn_set_item_id == $vn_item_id) {
$va_set_item_info["previous_id"] = $pn_previous_id;
$va_set_item_info["item_id"] = $vn_item_id;
}
$pn_previous_id = $vn_item_id;
}
$va_set_item_info["item_id"] = $t_set_item->get("item_id");
$va_reps = $t_set_item->getRepresentations(array("mediumlarge", "small"), null, array("return_with_access" => $va_access_values));
$va_rep = array_shift($va_rep);
$this->view->setVar('t_object_representation', $t_rep = new ca_object_representations($va_rep['representation_id']));
$va_rep_display_info = caGetMediaDisplayInfo('cropped_gallery_media_overlay', $t_rep->getMediaInfo('media', 'INPUT', 'MIMETYPE'));
$this->view->setVar('rep_display_version', $va_rep_display_info['display_version']);
unset($va_display_info['display_version']);
$va_rep_display_info['poster_frame_url'] = $t_rep->getMediaUrl('media', $va_rep_display_info['poster_frame_version']);
unset($va_display_info['poster_frame_version']);
$this->view->setVar('rep_display_options', $va_rep_display_info);
$va_set_item_info["info"] = $va_rep['info'];
$va_set_item_info["label"] = $t_set_item->getLabelForDisplay();
$va_set_item_info["description"] = $t_set_item->get($this->opo_plugin_config->get('set_description_element_code'), array('convertLineBreaks' => true));
$va_set_item_info["item_description"] = $t_set_item->get($this->opo_plugin_config->get('set_item_description_element_code'), array('convertLineBreaks' => true));
$va_set_item_info["row_id"] = $t_set_item->get("row_id");
$va_set_item_info["lesson"] = $t_set_item->get('set_item_description');
$t_object = new ca_objects($t_set_item->get("row_id"));
$va_set_item_info["object_label"] = $t_object->getLabelForDisplay();
$this->view->setVar('item_info', $va_set_item_info);
$this->render($this->ops_theme . '/ajax_item_info_html.php');
}
示例2: setItemInfo
public function setItemInfo()
{
$va_access_values = caGetUserAccessValues($this->request);
$pn_set_id = $this->request->getParameter('set_id', pInteger);
$t_set = new ca_sets($pn_set_id);
$this->view->setVar('set_id', $pn_set_id);
$pn_set_item_id = $this->request->getParameter('set_item_id', pInteger);
$t_set_item = new ca_set_items($pn_set_item_id);
$va_set_item_info = array();
$va_items = $t_set->getItemIDs(array("checkAccess" => $va_access_values));
$pn_previous_id = "";
foreach ($va_items as $vn_item_id => $va_item_info) {
if ($va_set_item_info["item_id"]) {
$va_set_item_info["next_id"] = $vn_item_id;
break;
}
if ($pn_set_item_id == $vn_item_id) {
$va_set_item_info["previous_id"] = $pn_previous_id;
$va_set_item_info["item_id"] = $vn_item_id;
}
$pn_previous_id = $vn_item_id;
}
$va_set_item_info["item_id"] = $t_set_item->get("item_id");
$va_set_item_info["info"] = $va_rep[0]['info'];
$va_set_item_info["label"] = $t_set_item->getLabelForDisplay();
$va_set_item_info["description"] = $t_set_item->get($this->opo_plugin_config->get('set_description_element_code'), array('convertLineBreaks' => true));
$va_set_item_info["row_id"] = $t_set_item->get("row_id");
$t_occurrence = new ca_occurrences($t_set_item->get("row_id"));
$va_set_item_info["label"] = $t_occurrence->getLabelForDisplay();
$va_mediumlarge_stills = $t_occurrence->get('ca_occurrences.ic_stills.ic_stills_media', array('version' => "mediumlarge", "showMediaInfo" => false, "returnAsArray" => true));
if (sizeof($va_mediumlarge_stills) > 0) {
$va_set_item_info["media_still"] = array_shift($va_mediumlarge_stills);
$va_image_caption = $t_occurrence->get('ca_occurrences.ic_stills.ic_stills_credit', array("returnAsArray" => true));
$vs_image_caption = array_shift($va_image_caption);
if ($vs_image_caption) {
$va_set_item_info["media_still_caption"] = $vs_image_caption;
}
}
if ($vs_video = $t_occurrence->get('ca_occurrences.ic_moving_images.ic_moving_images_media', array('version' => 'original', 'showMediaInfo' => false, 'viewer_width' => 580, 'viewer_height' => 450, 'poster_frame_version' => 'mediumlarge'))) {
$va_set_item_info["media_video"] = $vs_video;
if ($vs_video_caption = $t_occurrence->get('ca_occurrences.ic_moving_images.ic_moving_images_credit')) {
$va_set_item_info["media_video_caption"] = $vs_video_caption;
}
}
$this->view->setVar('item_info', $va_set_item_info);
$this->render('Exhibits/ajax_item_info_html.php');
}
示例3: getSetItemInfo
public function getSetItemInfo()
{
$pn_item_id = $this->request->getParameter('item_id', pInteger);
$pn_set_id = $this->request->getParameter('set_id', pInteger);
$t_set = new ca_sets($pn_set_id);
$t_set_item = new ca_set_items($pn_item_id);
$t_object = new ca_objects($t_set_item->get("row_id"));
$va_set_item_ids = array_keys($t_set->getItemIDs(array("checkAccess" => $this->opa_access_values)));
$this->view->setVar("set_num_items", sizeof($va_set_item_ids));
$this->view->setVar("set_item_num", array_search($pn_item_id, $va_set_item_ids) + 1);
$this->view->setVar("object", $t_object);
$this->view->setVar("object_id", $t_set_item->get("row_id"));
$this->view->setVar("label", $t_object->getLabelForDisplay());
//
// Tag substitution
//
// Views can contain tags in the form {{{tagname}}}. Some tags, such as "label" are defined by
// this controller. More usefully, you can pull data from the item being detailed by using a valid "get" expression
// as a tag (Eg. {{{ca_objects.idno}}}. Even more usefully for some, you can also use a valid bundle display template
// (see http://docs.collectiveaccess.org/wiki/Bundle_Display_Templates) as a tag. The template will be evaluated in the
// context of the item being detailed.
//
$va_defined_vars = array_keys($this->view->getAllVars());
// get list defined vars (we don't want to copy over them)
$va_tag_list = $this->getTagListForView("Gallery/set_item_info_html.php");
// get list of tags in view
foreach ($va_tag_list as $vs_tag) {
if (in_array($vs_tag, $va_defined_vars)) {
continue;
}
if (strpos($vs_tag, "^") !== false || strpos($vs_tag, "<") !== false) {
$this->view->setVar($vs_tag, $t_object->getWithTemplate($vs_tag, array('checkAccess' => $this->opa_access_values)));
} elseif (strpos($vs_tag, ".") !== false) {
$this->view->setVar($vs_tag, $t_object->get($vs_tag, array('checkAccess' => $this->opa_access_values)));
} else {
$this->view->setVar($vs_tag, "?{$vs_tag}");
}
}
$this->render("Gallery/set_item_info_html.php");
}
示例4: array
}
$t_library_item = new ca_set_items($va_library_set_item);
$va_library_caption = $t_library_item->get('ca_set_items.caption');
}
if (is_array($va_library_item_ids) && sizeof($va_library_item_ids)) {
$t_object = new ca_objects();
$va_library_media = $t_object->getPrimaryMediaForIDs($va_library_item_ids, array("small"), array('checkAccess' => caGetUserAccessValues($this->request)));
}
}
if ($vs_archive_set_code = $this->request->config->get("featured_archive_set")) {
$t_archive_set = new ca_sets();
$t_archive_set->load(array('set_code' => $vs_archive_set_code));
# Enforce access control on set
if (sizeof($va_access_values) == 0 || sizeof($va_access_values) && in_array($t_archive_set->get("access"), $va_access_values)) {
$va_archive_item_ids = array_keys(is_array($va_tmp = $t_archive_set->getItemRowIDs(array('checkAccess' => $va_access_values, 'shuffle' => 0))) ? $va_tmp : array());
$va_archive_items = $t_archive_set->getItemIDs();
foreach ($va_archive_items as $va_archive_item => $va_archive) {
$va_archive_set_item = $va_archive_item;
break;
}
$t_archive_item = new ca_set_items($va_archive_set_item);
$va_archive_caption = $t_archive_item->get('ca_set_items.caption');
}
if (is_array($va_archive_item_ids) && sizeof($va_archive_item_ids)) {
$t_object = new ca_objects();
$va_archive_media = $t_object->getPrimaryMediaForIDs($va_archive_item_ids, array("small"), array('checkAccess' => caGetUserAccessValues($this->request)));
}
}
if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) {
print "<div id='homepageLogin'>";
print $this->render('LoginReg/form_login_html.php');