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


PHP Issue::GetList方法代码示例

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


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

示例1: CreateList

 /**
  * Creates the list of objects. Sets the parameter $p_hasNextElements to
  * true if this list is limited and elements still exist in the original
  * list (from which this was truncated) after the last element of this
  * list.
  *
  * @param int $p_start
  * @param int $p_limit
  * @param array $p_parameters
  * @param int &$p_count
  * @return array
  */
 protected function CreateList($p_start = 0, $p_limit = 0, array $p_parameters, &$p_count)
 {
     $issuesList = Issue::GetList($this->m_constraints, $this->m_order, $p_start, $p_limit, $p_count, false, false);
     $metaIssuesList = array();
     foreach ($issuesList as $issue) {
         $metaIssuesList[] = new MetaIssue($issue['publication_id'], $issue['language_id'], $issue['number']);
     }
     return $metaIssuesList;
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:21,代码来源:IssuesList.php

示例2: CreateList

	/**
	 * Creates the list of objects. Sets the parameter $p_hasNextElements to
	 * true if this list is limited and elements still exist in the original
	 * list (from which this was truncated) after the last element of this
	 * list.
	 *
	 * @param int $p_start
	 * @param int $p_limit
	 * @param array $p_parameters
	 * @param int &$p_count
	 * @return array
	 */
	protected function CreateList($p_start = 0, $p_limit = 0, array $p_parameters, &$p_count)
	{
	    $issuesList = Issue::GetList($this->m_constraints, $this->m_order, $p_start, $p_limit, $p_count);
	    $metaIssuesList = array();
	    foreach ($issuesList as $issue) {
	        $metaIssuesList[] = new MetaIssue($issue->getPublicationId(),
	                                          $issue->getLanguageId(),
	                                          $issue->getIssueNumber());
	    }
	    return $metaIssuesList;
	}
开发者ID:nistormihai,项目名称:Newscoop,代码行数:23,代码来源:IssuesList.php

示例3: smarty_function_camp_select


//.........这里部分代码省略.........
            $html = '<select name="subscription_language[]" multiple size="3" ';
            if ($subsType == 'paid') {
                $html .= 'onchange="update_subscription_payment();" ';
            }
            $html .= 'id="select_language" ' . $p_params['html_code'] . '>';
        } elseif ($attribute == 'alllanguages') {
        	$html = '<input type="checkbox" name="subs_all_languages" '
                .'onchange="ToggleElementEnabled(\'select_language\');';
            if ($subsType == 'paid') {
                $html .= ' update_subscription_payment();';
            }
            $html .= '" ' . $p_params['html_code'] . ' />';
        } elseif ($attribute == 'section') {
            if ($campsite->subs_by_type == 'publication') {
                $html = '<input type="hidden" name="cb_subs[]" value="'
                    .$campsite->section->number.'" />';
            } elseif ($campsite->subs_by_type == 'section') {
                $html = '<input type="checkbox" name="cb_subs[]" value="'
                    .$campsite->section->number.'" '
                    .'onchange="update_subscription_payment();" '
                    . $p_params['html_code'] . ' />';
            }
        }
        break;

    case 'search':
        if ($attribute == 'mode') {
            $html = '<input type="checkbox" name="f_match_all" '
            . $p_params['html_code'] . ' />';
        } elseif ($attribute == 'level') {
        	require_once($GLOBALS['g_campsiteDir'] . '/admin-files/localizer/Localizer.php');
        	if (!isGS('Publication')) {
        		camp_load_translation_strings("globals", $campsite->language->code);
        	}
            $html = '<select name="f_search_'.$attribute.'" ' . $p_params['html_code'] . '>'
                .'<option value="1" selected="selected">' . getGS('Publication') . '</option>'
                .'<option value="2">' . getGS('Issue') . '</option>'
                .'<option value="3">' . getGS('Section') . '</option>'
                .'</select>';
        } elseif ($attribute == 'section') {
        	require_once($GLOBALS['g_campsiteDir'] . '/admin-files/localizer/Localizer.php');
        	$constraints = array();
            $operator = new Operator('is', 'integer');
            if ($campsite->publication->defined) {
            	$constraints[] = new ComparisonOperation('IdPublication', $operator, $campsite->publication->identifier);
            }
            if ($campsite->language->defined) {
            	$constraints[] = new ComparisonOperation('IdLanguage', $operator, $campsite->language->number);
            }
            if ($campsite->issue->defined) {
            	$constraints[] = new ComparisonOperation('NrIssue', $operator, $campsite->issue->number);
            }
            $sectionsList = Section::GetList($constraints, array('Name'=>'ASC'), 0, 0, $count);
            if (!isGS('-- ALL SECTIONS --')) {
            	camp_load_translation_strings("user_subscription_sections", $campsite->language->code);
            }
            $html = '<select name="f_search_section" ' . $p_params['html_code'] . '>';
            $html .= '<option value="0" selected="selected">' . getGS('-- ALL SECTIONS --') . '</option>';
            foreach ($sectionsList as $section) {
            	$html .= '<option value="' . $section->getSectionNumber() . '">'
            	      . htmlspecialchars($section->getName()) . '</option>';
            }
            $html .= '</select>';
        } elseif ($attribute == 'issue') {
        	$constraints = array();
            $operator = new Operator('is', 'integer');
            if ($campsite->publication->defined) {
                $constraints[] = new ComparisonOperation('IdPublication', $operator, $campsite->publication->identifier);
            }
            if ($campsite->language->defined) {
                $constraints[] = new ComparisonOperation('IdLanguage', $operator, $campsite->language->number);
            }
            $constraints[] = new ComparisonOperation('published', $operator, 'true');
            $issuesList = Issue::GetList($constraints,
                                         array(array('field'=>'bynumber', 'dir'=>'DESC')),
                                         0, 0, $count);
            $html = '<select name="f_search_issue" ' . $p_params['html_code'] . '>';
            $html .= '<option value="0" selected="selected">&nbsp;</option>';
            foreach ($issuesList as $issue) {
            	$issueDesc = $issue->getIssueNumber() . '. '
            	           . $issue->getName()
            	           . ' ('. $issue->getPublicationDate() . ')';
                $html .= '<option value="' . $issue->getIssueNumber() . '">'
                      . htmlspecialchars($issueDesc) . '</option>';
            }
            $html .= '</select>';
        }
    }

    if ($selectTag == true) {
        $html.= smarty_function_html_options(array('output' => $output,
                                                   'values' => $values,
                                                   'selected' => $fieldValue,
                                                   'print_result' => false),
                                             $p_smarty);
        $html.= '</select>';
    }

    return $html;
} // fn smarty_function_camp_select
开发者ID:nistormihai,项目名称:Newscoop,代码行数:101,代码来源:function.camp_select.php

示例4: testGetListBadParameter

    public function testGetListBadParameter()
    {
        global $g_ado_db;

        // builds the constraint
        $leftOperand = 'ShortName';
        $rightOperand = 'first';
        $operator = new Operator('is', 'sql');
        $comparisonOperationObj = new ComparisonOperation($leftOperand,
                                                          $operator,
                                                          $rightOperand);

        // sets the params for Issue::GetList()
        $params = array($comparisonOperationObj);
        $order = array('Name' => 'DESC');
        $limitStart = 0;
        $limitOffset = 0;

        $this->assertEquals(null, Issue::GetList($params, $order, $limitStart, $limitOffset));
    } // fn testGetListBadParameter
开发者ID:nistormihai,项目名称:Newscoop,代码行数:20,代码来源:IssueTest.php


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