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


PHP ca_sets::find方法代码示例

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


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

示例1: _setUniqueSetCode

 /** 
  * 
  */
 private function _setUniqueSetCode()
 {
     if (!$this->getPrimaryKey()) {
         return null;
     }
     $vs_set_code = trim($this->get('set_code'));
     if (($vs_set_code_proc = preg_replace("![ ]+!", "_", $vs_set_code)) !== $vs_set_code || !strlen($vs_set_code)) {
         $this->setMode(ACCESS_WRITE);
         if (!strlen($vs_set_code)) {
             if (!($vs_set_code = $this->getLabelForDisplay())) {
                 $vs_set_code = 'set_' . $this->getPrimaryKey();
             }
         }
         $vs_new_set_name = substr(preg_replace('![^A-Za-z0-9]+!', '_', $vs_set_code), 0, 50);
         if (ca_sets::find(array('set_code' => $vs_new_set_name), array('returnAs' => 'firstId')) > 0) {
             $vs_new_set_name .= '_' . $this->getPrimaryKey();
         }
         $this->set('set_code', $vs_new_set_name);
         return $this->update();
     }
     return false;
 }
开发者ID:kai-iak,项目名称:providence,代码行数:25,代码来源:ca_sets.php

示例2: caGetUserAccessValues

$va_access_values = caGetUserAccessValues($this->request);
if ($vs_set_code = $this->request->config->get("featured_library_set")) {
    AssetLoadManager::register("carousel");
    $t_set = new ca_sets();
    $t_set->load(array('set_code' => $vs_set_code));
    # Enforce access control on set
    if (sizeof($va_access_values) == 0 || sizeof($va_access_values) && in_array($t_set->get("access"), $va_access_values)) {
        $va_item_ids = array_keys(is_array($va_tmp = $t_set->getItemRowIDs(array('checkAccess' => $va_access_values, 'shuffle' => 0))) ? $va_tmp : array());
    }
    if (is_array($va_item_ids) && sizeof($va_item_ids)) {
        $t_object = new ca_objects();
        $va_item_media = $t_object->getPrimaryMediaForIDs($va_item_ids, array("slideshowsmall"), array('checkAccess' => caGetUserAccessValues($this->request)));
    }
}
$vs_library_set_code = $this->request->config->get("new_library_set");
$vs_library_code = ca_sets::find(array('set_code' => $vs_library_set_code), array('returnAs' => 'firstId'));
?>
<div class="container">
	<div class="row">
		<div class="col-sm-8 library">
			<h1>Library Advanced Search</h1>
			<p>Enter your search terms in the fields below.</p>
			{{{form}}}
				<div class="advancedSearchField"> 
					{{{_fieldlist%width=200px&height=1&fieldListWidth=100&fieldListHeight=1&fields=_fulltext:Keyword;title:Title;ca_entities.preferred_labels.displayname/author:Author;ca_objects.pub_year:Date of Publication;ca_entities.preferred_labels.displayname/publisher:Publisher;ca_objects.ISBN:ISBN;ca_objects.series:Series;ca_objects.lcsh_terms:Subject;}}}
					{{{_fieldlist:boolean}}}
				</div>

				<div class="advancedSearchField">
					{{{_fieldlist%width=200px&height=1&fieldListWidth=100&fieldListHeight=1&fields=_fulltext:Keyword;title:Title;ca_entities.preferred_labels.displayname/author:Author;ca_objects.pub_year:Date of Publication;ca_entities.preferred_labels.displayname/publisher:Publisher;ca_objects.ISBN:ISBN;ca_objects.series:Series;ca_objects.lcsh_terms:Subject;}}}
					{{{_fieldlist:boolean}}}
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:31,代码来源:ca_objects_advanced_search_library_html.php


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