本文整理匯總了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;
}