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


PHP GVCommon::get_entries方法代码示例

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


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

示例1: get_entries

 /**
  * Get the entries that will be shown in the current widget
  *
  * @param  array $instance Settings for the current widget
  *
  * @return array $entries Multidimensional array of Gravity Forms entries
  */
 private function get_entries($instance, $form_id)
 {
     // Get the settings for the View ID
     $view_settings = gravityview_get_template_settings($instance['view_id']);
     // Set the context view ID to avoid conflicts with the Advanced Filter extension.
     $criteria['context_view_id'] = $instance['view_id'];
     $instance['limit'] = isset($instance['limit']) ? $instance['limit'] : 10;
     $view_settings['id'] = $instance['view_id'];
     $view_settings['page_size'] = $instance['limit'];
     // Prepare paging criteria
     $criteria['paging'] = array('offset' => 0, 'page_size' => $instance['limit']);
     // Prepare Search Criteria
     $criteria['search_criteria'] = array('field_filters' => array());
     $criteria['search_criteria'] = GravityView_frontend::process_search_only_approved($view_settings, $criteria['search_criteria']);
     $criteria['search_criteria']['status'] = apply_filters('gravityview_status', 'active', $view_settings);
     /**
      * Modify the search parameters before the entries are fetched
      */
     $criteria = apply_filters('gravityview/widget/recent-entries/criteria', $criteria, $instance, $form_id);
     $results = GVCommon::get_entries($form_id, $criteria);
     return $results;
 }
开发者ID:mgratch,项目名称:GravityView,代码行数:29,代码来源:class-gravityview-recent-entries-widget.php

示例2: array

$criteria['paging'] = array('offset' => 0, 'page_size' => $view_settings['page_size']);
// Prepare Search Criteria
$criteria['search_criteria'] = array('field_filters' => array(array('key' => 'created_by', 'value' => $created_by, 'operator' => 'is')));
$criteria['search_criteria'] = GravityView_frontend::process_search_only_approved($view_settings, $criteria['search_criteria']);
$criteria['search_criteria']['status'] = apply_filters('gravityview_status', 'active', $view_settings);
/**
 * Modify the search parameters before the entries are fetched
 *
 * @since 1.11
 *
 * @param array $criteria Gravity Forms search criteria array, as used by GVCommon::get_entries()
 * @param array $view_settings Associative array of settings with plugin defaults used if not set by the View
 * @param int $form_id The Gravity Forms ID
 */
$criteria = apply_filters('gravityview/field/other_entries/criteria', $criteria, $view_settings, $form_id);
$entries = GVCommon::get_entries($form_id, $criteria);
// Don't show if no entries and the setting says so
if (empty($entries) && $gravityview_view->getCurrentFieldSetting('no_entries_hide')) {
    return;
}
// If there are search results, get the entry list object
$list = new GravityView_Entry_List($entries, $gravityview_view->getPostId(), $field['form'], $gravityview_view->getCurrentFieldSetting('link_format'), $gravityview_view->getCurrentFieldSetting('after_link'), 'other_entries');
// Generate and echo the output
$list->output();
/**
 * @since 1.7.6
 * @deprecated since 1.11
 */
$deprecated = apply_filters('gravityview/field/other_entries/args', array(), $field);
if (!empty($deprecated)) {
    _deprecated_function('The "gravityview/field/other_entries/args" filter', 'GravityView 1.11', 'gravityview/field/other_entries/criteria');
开发者ID:hansstam,项目名称:makerfaire,代码行数:31,代码来源:other_entries.php

示例3: gravityview_get_entries

/**
 * Retrieve entries given search, sort, paging criteria
 *
 * @see  GFAPI::get_entries()
 * @see GFFormsModel::get_field_filters_where()
 * @access public
 * @param int|array $form_ids The ID of the form or an array IDs of the Forms. Zero for all forms.
 * @param mixed $passed_criteria (default: null)
 * @param mixed &$total (default: null)
 * @return mixed False: Error fetching entries. Array: Multi-dimensional array of Gravity Forms entry arrays
 */
function gravityview_get_entries($form_ids = null, $passed_criteria = null, &$total = null)
{
    return GVCommon::get_entries($form_ids, $passed_criteria, $total);
}
开发者ID:mgratch,项目名称:GravityView,代码行数:15,代码来源:connector-functions.php


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