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


PHP eZContentLanguage::topPriorityLanguageByMask方法代码示例

本文整理汇总了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' );
            }
        }
    }
开发者ID:robinmuilwijk,项目名称:ezpublish,代码行数:30,代码来源:ezcontentobject.php

示例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();
 }
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:50,代码来源:ezcontentobject.php


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