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


PHP ca_sets::getItemCount方法代码示例

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


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

示例1: testCreateDeleteSet

 public function testCreateDeleteSet()
 {
     $o_db = new Db();
     $qr_objects = $o_db->query('select object_id from ca_objects where deleted=0');
     $va_object_ids = $qr_objects->getAllFieldValues('object_id');
     //$t = new Timer();
     $this->opt_set->addItems($va_object_ids);
     //var_dump($t->getTime());
     $this->assertSame(sizeof($va_object_ids), $this->opt_set->getItemCount());
     $this->opt_set->setMode(ACCESS_WRITE);
     //$t = new Timer();
     $this->opt_set->delete(true);
     //var_dump($t->getTime());
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:14,代码来源:SetDeleteTest.php

示例2: getParametersForDisplay

 public function getParametersForDisplay($pa_rec)
 {
     $va_parameters = caUnserializeForDatabase($pa_rec["parameters"]);
     $va_params = array();
     $t_set = new ca_sets($va_parameters['set_id']);
     $va_params['importing_from'] = array('label' => _t("Applying batch edits to set"), 'value' => $t_set->getLabelForDisplay());
     $va_params['number_of_records'] = array('label' => _t("Records to edit"), 'value' => (int) $t_set->getItemCount(array('user_id' => $va_parameters['user_id'])));
     $t_ui = new ca_editor_uis($va_parameters['ui_id']);
     $t_screen = new ca_editor_ui_screens();
     if ($t_screen->load(array('ui_id' => $t_ui->getPrimaryKey(), 'screen_id' => str_ireplace("screen", "", $va_parameters['screen'])))) {
         $va_params['ui'] = array('label' => _t("Using interface"), 'value' => $t_ui->getLabelForDisplay() . " ➜ " . $t_screen->getLabelForDisplay());
     }
     return $va_params;
 }
开发者ID:ffarago,项目名称:pawtucket2,代码行数:14,代码来源:batchEditor.php

示例3: GetItemInfo

 public function GetItemInfo()
 {
     if ($pn_set_id = $this->request->getParameter('set_id', pInteger)) {
         $t_set = new ca_sets($pn_set_id);
         if (!$t_set->getPrimaryKey()) {
             $this->notification->addNotification(_t("The set does not exist"), __NOTIFICATION_TYPE_ERROR__);
             return;
         }
         // does user have edit access to set?
         if (!$t_set->haveAccessToSet($this->request->getUserID(), __CA_SET_EDIT_ACCESS__, null, array('request' => $this->request))) {
             $this->notification->addNotification(_t("You cannot edit this set"), __NOTIFICATION_TYPE_ERROR__);
             $this->Edit();
             return;
         }
         $pn_table_num = $t_set->get('table_num');
         $vn_set_item_count = $t_set->getItemCount(array('user_id' => $this->request->getUserID()));
     } else {
         $pn_table_num = $this->request->getParameter('table_num', pInteger);
         $vn_set_item_count = 0;
     }
     $pn_row_id = $this->request->getParameter('row_id', pInteger);
     $t_row = $this->opo_datamodel->getInstanceByTableNum($pn_table_num, true);
     if (!$t_row->load($pn_row_id)) {
         $va_errors[] = _t("Row_id is invalid");
     }
     $this->view->setVar('errors', $va_errors);
     $this->view->setVar('set_id', $pn_set_id);
     $this->view->setVar('row_id', $pn_row_id);
     $this->view->setVar('idno', $t_row->get($t_row->getProperty('ID_NUMBERING_ID_FIELD')));
     $this->view->setVar('idno_sort', $t_row->get($t_row->getProperty('ID_NUMBERING_SORT_FIELD')));
     $this->view->setVar('set_item_label', $t_row->getLabelForDisplay(false));
     if ($vs_template = $this->getRequest()->getParameter('displayTemplate', pString)) {
         $this->view->setVar('displayTemplate', $t_row->getWithTemplate($vs_template));
     }
     $this->view->setVar('representation_tag', '');
     if (method_exists($t_row, 'getRepresentations')) {
         if ($vn_set_item_count > 50) {
             $vs_thumbnail_version = 'tiny';
         } else {
             $vs_thumbnail_version = "thumbnail";
         }
         if (sizeof($va_reps = $t_row->getRepresentations(array($vs_thumbnail_version)))) {
             $va_rep = array_shift($va_reps);
             $this->view->setVar('representation_tag', $va_rep['tags'][$vs_thumbnail_version]);
             $this->view->setVar('representation_url', $va_rep['urls'][$vs_thumbnail_version]);
             $this->view->setVar('representation_width', $va_rep['info'][$vs_thumbnail_version]['WIDTH']);
             $this->view->setVar('representation_height', $va_rep['info'][$vs_thumbnail_version]['HEIGHT']);
         }
     }
     $this->render('ajax_set_item_info_json.php');
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:51,代码来源:SetEditorController.php

示例4: caGetGalleryConfig

<div>
	<H1><?php 
print $this->getVar("section_name");
?>
</H1>
<?php 
$o_config = caGetGalleryConfig();
$va_access_values = caGetUserAccessValues($this->request);
$va_sets = $this->getVar("sets");
$va_first_items_from_set = $this->getVar("first_items_from_sets");
print "<div class='container'>";
if (is_array($va_sets) && sizeof($va_sets)) {
    $t_set = new ca_sets();
    foreach ($va_sets as $vn_set_id => $va_set) {
        $t_set->load($vn_set_id);
        print "<div class='row'>";
        print "<div class='col-sm-12 col-sm-offset-0 col-md-6 col-md-offset-3 col-lg-6 col-lg-offset-3'><div class='galleryListItem'>";
        $va_first_item = array_shift(array_shift($t_set->getFirstItemsFromSets(array($vn_set_id), array("version" => "small", "checkAccess" => $va_access_values))));
        print "<div class='galleryListItemImg'>" . $va_first_item["representation_tag"] . "</div>";
        print "<H3>" . $t_set->getLabelForDisplay() . "</H3>";
        print "<p class='count'>" . $t_set->getItemCount(array("checkAccess" => $va_access_values)) . " items</p>";
        if ($vs_description = $t_set->get($o_config->get('gallery_set_description_element_code'))) {
            print "<p><strong>" . $vs_description . "</strong></p>";
        }
        print caNavLink($this->request, "<span class='glyphicon glyphicon-th-large'></span>", "", "", "Gallery", $t_set->get("set_id")) . "&nbsp;&nbsp;" . caNavLink($this->request, "<strong>" . _t("VIEW GALLERY") . "</strong>", "", "", "Gallery", $t_set->get("set_id"));
        print "<div style='clear:both;'></div></div></div></div>\n";
    }
}
print "</div>";
?>
</div>
开发者ID:ffarago,项目名称:pawtucket2,代码行数:31,代码来源:index_html.php


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