本文整理汇总了PHP中eZContentLanguage::topPriorityLanguageByMask方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentLanguage::topPriorityLanguageByMask方法的具体用法?PHP eZContentLanguage::topPriorityLanguageByMask怎么用?PHP eZContentLanguage::topPriorityLanguageByMask使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZContentLanguage
的用法示例。
在下文中一共展示了eZContentLanguage::topPriorityLanguageByMask方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: eZContentObject
function eZContentObject( $row )
{
$this->eZPersistentObject( $row );
$this->ClassIdentifier = false;
if ( isset( $row['contentclass_identifier'] ) )
$this->ClassIdentifier = $row['contentclass_identifier'];
$this->ClassName = false;
if ( isset( $row['contentclass_name'] ) )
$this->ClassName = $row['contentclass_name'];
if ( isset( $row['serialized_name_list'] ) )
$this->ClassName = eZContentClass::nameFromSerializedString( $row['serialized_name_list'] );
$this->CurrentLanguage = false;
if ( isset( $row['content_translation'] ) )
{
$this->CurrentLanguage = $row['content_translation'];
}
else if ( isset( $row['real_translation'] ) )
{
$this->CurrentLanguage = $row['real_translation'];
}
else if ( isset( $row['language_mask'] ) )
{
$topPriorityLanguage = eZContentLanguage::topPriorityLanguageByMask( $row['language_mask'] );
if ( $topPriorityLanguage )
{
$this->CurrentLanguage = $topPriorityLanguage->attribute( 'locale' );
}
}
}
示例2: eZContentObject
/**
* Initializes the object with $row.
*
* If $row is an integer, it will try to fetch it from the database using it as the unique ID.
*
* @param int|array $row
*/
function eZContentObject($row)
{
$this->eZPersistentObject($row);
$this->ClassIdentifier = false;
if (isset($row['contentclass_identifier'])) {
$this->ClassIdentifier = $row['contentclass_identifier'];
}
if (isset($row['class_identifier'])) {
$this->ClassIdentifier = $row['class_identifier'];
}
$this->ClassName = false;
// Depending on how the information is retrieved, the "serialized_name_list" is sometimes available in "class_serialized_name_list" key
if (isset($row['class_serialized_name_list'])) {
$row['serialized_name_list'] = $row['class_serialized_name_list'];
}
// Depending on how the information is retrieved, the "contentclass_name" is sometimes available in "class_name" key
if (isset($row['class_name'])) {
$row['contentclass_name'] = $row['class_name'];
}
if (isset($row['contentclass_name'])) {
$this->ClassName = $row['contentclass_name'];
}
if (isset($row['serialized_name_list'])) {
$this->ClassName = eZContentClass::nameFromSerializedString($row['serialized_name_list']);
}
$this->CurrentLanguage = false;
if (isset($row['content_translation'])) {
$this->CurrentLanguage = $row['content_translation'];
} else {
if (isset($row['real_translation'])) {
$this->CurrentLanguage = $row['real_translation'];
} else {
if (isset($row['language_mask'])) {
$topPriorityLanguage = eZContentLanguage::topPriorityLanguageByMask($row['language_mask']);
if ($topPriorityLanguage) {
$this->CurrentLanguage = $topPriorityLanguage->attribute('locale');
}
}
}
}
// Initialize the permission array cache
$this->Permissions = array();
}