本文整理汇总了PHP中eZContentObjectStateGroup::setLanguageObject方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentObjectStateGroup::setLanguageObject方法的具体用法?PHP eZContentObjectStateGroup::setLanguageObject怎么用?PHP eZContentObjectStateGroup::setLanguageObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZContentObjectStateGroup
的用法示例。
在下文中一共展示了eZContentObjectStateGroup::setLanguageObject方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetchByConditions
/**
* Fetches content object state groups by certain conditions
*
* @param array $conditions
* @param integer $limit
* @param integer $offset
* @return array
*/
private static function fetchByConditions($conditions, $limit, $offset)
{
$db = eZDB::instance();
$defaultConditions = array('ezcobj_state_group_language.contentobject_state_group_id=ezcobj_state_group.id', eZContentLanguage::languagesSQLFilter('ezcobj_state_group'), eZContentLanguage::sqlFilter('ezcobj_state_group_language', 'ezcobj_state_group'));
$conditions = array_merge($conditions, $defaultConditions);
$conditionsSQL = implode(' AND ', $conditions);
$sql = "SELECT * " . "FROM ezcobj_state_group, ezcobj_state_group_language " . "WHERE {$conditionsSQL}";
$rows = $db->arrayQuery($sql, array('limit' => $limit, 'offset' => $offset));
$stateGroups = array();
foreach ($rows as $row) {
$stateGroup = new eZContentObjectStateGroup($row);
$stateGroupLanguage = new eZContentObjectStateGroupLanguage($row);
$stateGroup->setLanguageObject($stateGroupLanguage);
$stateGroups[] = $stateGroup;
}
return $stateGroups;
}