当前位置: 首页>>代码示例>>PHP>>正文


PHP ca_objects::makeSearchResult方法代码示例

本文整理汇总了PHP中ca_objects::makeSearchResult方法的典型用法代码示例。如果您正苦于以下问题:PHP ca_objects::makeSearchResult方法的具体用法?PHP ca_objects::makeSearchResult怎么用?PHP ca_objects::makeSearchResult使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ca_objects的用法示例。


在下文中一共展示了ca_objects::makeSearchResult方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: recentlyAdded

 function recentlyAdded()
 {
     // redirect user if not logged in
     if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn() || $this->request->config->get('show_bristol_only') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form"));
     } elseif ($this->request->config->get('show_bristol_only') && $this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "bristol", "Show", "Index"));
     }
     $t_object = new ca_objects();
     if (($vn_num_items = (int) $this->request->config->get('rss_number_of_items')) <= 0) {
         $vn_num_items = 10;
     }
     $va_recently_added_objects = $t_object->getRecentlyAddedItems($vn_num_items, array('checkAccess' => caGetUserAccessValues($this->request)));
     $va_entries = array();
     $va_object_ids = array();
     foreach ($va_recently_added_objects as $va_object) {
         $va_object_ids[] = $va_object['object_id'];
     }
     $qr_res = $t_object->makeSearchResult('ca_objects', $va_object_ids);
     $vs_description_bundle = $this->request->config->get('rss_description');
     while ($qr_res->nextHit()) {
         $vn_object_id = $qr_res->get('ca_objects.object_id');
         if (!($vn_creation_time = $t_object->getCreationTimestamp($vn_object_id, array('timestampOnly' => true)))) {
             $vn_creation_time = time();
         }
         if (!($vn_update_time = $t_object->getLastChangeTimestamp($vn_object_id, array('timestampOnly' => true)))) {
             $vn_update_time = time();
         }
         $va_entries[] = array('title' => $qr_res->get('ca_objects.preferred_labels.name'), 'link' => $vs_link = $this->request->config->get('site_host') . caNavUrl($this->request, '', 'Detail/Object', 'Index', array('object_id' => $vn_object_id)), 'guid' => $vs_link, 'lastUpdate' => $vn_update_time, 'description' => $vs_description_bundle ? $qr_res->getMediaTag("ca_object_representations.media", "preview") . "\n" . $qr_res->get($vs_description_bundle) : '', 'pubDate' => $vn_creation_time);
     }
     $va_feed_data = array('title' => _t('Recently added'), 'link' => $this->request->getRequestUrl(true), 'charset' => 'UTF-8', 'entries' => $va_entries);
     $o_feed = Zend_Feed::importArray($va_feed_data, 'rss');
     $this->view->setVar('feed', $o_feed);
     $this->render('Feed/feed_recently_added_xml.php');
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:35,代码来源:FeedController.php

示例2: sizeof

				<div class="detailTool"><a href='#' onclick='jQuery("#detailComments").slideToggle(); return false;'><span class="glyphicon glyphicon-comment"></span>Comments (<?php 
print sizeof($va_comments);
?>
)</a></div><!-- end detailTool -->
				<div id='detailComments'>{{{itemComments}}}</div><!-- end itemComments -->
				<div class="detailTool"><span class="glyphicon glyphicon-share-alt"></span>{{{shareLink}}}</div><!-- end detailTool -->
			</div><!-- end detailTools -->		
		
		{{{<ifcount code="ca_occurrences.distribution_status.distribution_date" min="1"><span class='metaTitle'>Distribution Status</span></ifcount>}}}
			{{{<ifcount code="ca_occurrences.distribution_status.distribution_date" min="1"><span class='meta'><unit delimiter="<br/>"><div>^ca_occurrences.distribution_status.distribution_list, Expires ^ca_occurrences.distribution_status.distribution_date</div></unit></span></ifcount>}}}									
		
<?php 
$va_object_ids = $t_occurrence->get('ca_objects.object_id', array('returnAsArray' => true));
if (sizeof($va_object_ids) > 0) {
    $t_object = new ca_objects();
    $vo_result = $t_object->makeSearchResult("ca_objects", $va_object_ids);
    ?>
			<hr>
			<div id="detailRelatedObjects">
				<H6>Related Objects</H6>
				<div class="jcarousel-wrapper">
					<div id="detailScrollButtonNext"><i class="fa fa-angle-right"></i></div>
					<div id="detailScrollButtonPrevious"><i class="fa fa-angle-left"></i></div>
					<!-- Carousel -->
					<div class="jcarousel">
						<ul>
<?php 
    while ($vo_result->nextHit()) {
        ?>
						
							<li><div class='detailObjectsResult'>
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:31,代码来源:ca_occurrences_default_html.php

示例3: Get

 /**
  * 
  */
 public function Get()
 {
     $ps_query = $this->request->getParameter('term', pString);
     $o_search = new ObjectSearch();
     $qr_res = $o_search->search($ps_query);
     $va_object_ids = array();
     while ($qr_res->nextHit()) {
         $va_object_ids[$qr_res->get('object_id')] = false;
     }
     if (sizeof($va_object_ids)) {
         // get checked out items
         $o_db = new Db();
         $qr_checked_out_items = $o_db->query("\n\t\t\t\t\tSELECT DISTINCT i.object_id, i.loan_due_date\n\t\t\t\t\tFROM ca_commerce_order_items i\n\t\t\t\t\tWHERE\n\t\t\t\t\t\ti.loan_return_date IS NULL and i.loan_checkout_date > 0 AND i.object_id IN (?)\n\t\t\t\t", array(array_keys($va_object_ids)));
         while ($qr_checked_out_items->nextRow()) {
             $va_object_ids[$qr_checked_out_items->get('object_id')] = $qr_checked_out_items->get('loan_due_date');
         }
         $t_object = new ca_objects();
         $qr_res = $t_object->makeSearchResult('ca_objects', array_keys($va_object_ids));
         $va_items = caProcessRelationshipLookupLabel($qr_res, $t_object, array());
         foreach ($va_items as $vn_object_id => $va_object) {
             if ((int) $va_object_ids[$vn_object_id] > 0) {
                 $vs_due_date_for_display = caGetLocalizedDate($va_object_ids[$vn_object_id], array('format' => 'delimited', 'timeOmit' => true));
                 $va_items[$vn_object_id]['label'] .= ' [<em>' . _t('on loan through %1', $vs_due_date_for_display) . '</em>]';
                 $va_items[$vn_object_id]['due_date'] = $va_object_ids[$vn_object_id];
                 $va_items[$vn_object_id]['due_date_display'] = $vs_due_date_for_display;
             }
         }
     }
     if (!is_array($va_items)) {
         $va_items = array();
     }
     if (!sizeof($va_items)) {
         // nothing found
         $va_items[0] = array('label' => _t('No matches found'), 'type_id' => null, 'object_id' => 0);
     }
     $this->view->setVar('object_list', $va_items);
     $this->view->setVar('object_id_list', $va_object_ids);
     return $this->render('ajax_object_list_html.php');
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:42,代码来源:CheckOutController.php

示例4: caClientServicesFormatMessage

 *
 * ----------------------------------------------------------------------
 */
$t_message = $this->getVar('message');
$va_snapshot = $t_message->get('set_snapshot');
?>
 	<div id="caClientCommunicationsMessage">
 <?php 
print caClientServicesFormatMessage($this->request, $va_data = $t_message->getFieldValuesArray(), array('replyButton' => "<a href='#' class='caClientCommunicationsMessageReplyButton' onclick='jQuery(\"#caClientCommunicationsMessageDisplay\").load(\"" . caNavUrl($this->request, 'client', 'Communications', 'Reply', array('transaction_id' => $va_data['transaction_id'], 'communication_id' => $va_data['communication_id'])) . "\");'>" . _t("Reply") . "</a>"));
if (is_array($va_snapshot) && is_array($va_snapshot['items']) && sizeof($va_snapshot['items'])) {
    $va_ids = array();
    foreach ($va_snapshot['items'] as $vn_id => $vn_dummy) {
        $va_ids[] = (int) $vn_id;
    }
    $t_object = new ca_objects();
    $qr_res = $t_object->makeSearchResult('ca_objects', $va_ids);
    ?>
	<div class="caClientCommunicationsAttachedMediaContainer">
<?php 
    if ($vn_communication_id = $t_message->get('communication_id')) {
        print "<div>" . caNavLink($this->request, _t('Create new order with attached media'), 'caClientCommunicationsNewOrderButton', 'client', 'OrderEditor', 'CreateNewOrderFromCommunication', array('communication_id' => $vn_communication_id)) . "</div>";
    }
    ?>
		<a href="#" onclick="showHideCommunicationAttachedMedia(); return false;" id="caClientCommunicationsAttachedMediaControl" class="caClientCommunicationsAttachedMediaControl"><?php 
    print _t('Show attached media');
    ?>
 &rsaquo;</a>
		<br style="clear: both"/>
		
		<div id="caClientCommunicationsAttachedMedia" class="caClientCommunicationsAttachedMediaItems caClientCommunicationsAttachedMedia">
			<ul class="caClientCommunicationsAttachedMediaList">
开发者ID:guaykuru,项目名称:pawtucket,代码行数:31,代码来源:view_communication_html.php


注:本文中的ca_objects::makeSearchResult方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。