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


PHP eZContentObjectTreeNode::dataMap方法代码示例

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


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

示例1: getRelatedPublishers

    /**
     * This method returns list of related publisher folders if custom parameter ShowPublisherLogos is != null
     * @return null|PublisherFolder[]
     */
    protected function getRelatedPublishers()
    {
        $publisherFolders = null;

        if ($this->getCustomParameter('ShowPublisherLogos') == null)
        {
            return $publisherFolders;
        }
        if ($this->node instanceof eZContentObjectTreeNode)
        {
            $dataMap            = $this->node->dataMap();
            $taxonomies         = $dataMap["serialized_taxonomies"]->content();
            $publisherPaths     = $taxonomies["publisher_folder"];

            foreach ($publisherPaths as $publisherPath)
            {
                $publisherFolders[] = $this->applicationLocalized()->getPublisherFolderFromPath( $publisherPath );
            }
        }
        else
        {
            $publisherFolders = $this->applicationLocalized()->publisherFolders;
        }
        return $publisherFolders;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:29,代码来源:applicationDefault.php

示例2: getNodeUrl

    /**
     * @param eZContentObjectTreeNode $node
     * @return string
     */
    public function getNodeUrl(&$node = null)
    {
        $token = $this->getToken();

        $dataMap                        = $node->dataMap();
        $mediaContentAttribute          = $dataMap['media_content'];
        $mediaContentAttributeContent   = $mediaContentAttribute->content();
        $linkObjectID                   = $mediaContentAttributeContent['relation_list'][0]['contentobject_id'];
        $linkObject                     = eZContentObject::fetch( $linkObjectID );
        $linkDatamap                    = $linkObject->dataMap();
        $url                            = $linkDatamap['url']->content();

        $queryStringPosition = strpos($url, '?');
        $queryString = substr($url, $queryStringPosition + 1);
        $url = substr($url, 0, $queryStringPosition);

        $queryStringParts = array();

        parse_str($queryString, $queryStringParts);
        $queryStringParts[self::SESSION_ID_FIELD] = $token;

        $queryString = http_build_query($queryStringParts);
        $url .= '?' . $queryString;

        return $url;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:30,代码来源:externallinkhandlermedienspiegel.php

示例3: getNodeUrl

    /**
     * @param eZContentObjectTreeNode $node
     * @return string
     */
    public function getNodeUrl(&$node = null)
    {
        $dataMap                        = $node->dataMap();
        $mediaContentAttribute          = $dataMap['media_content'];
        $mediaContentAttributeContent   = $mediaContentAttribute->content();
        $linkObjectID                   = $mediaContentAttributeContent['relation_list'][0]['contentobject_id'];
        $linkObject                     = eZContentObject::fetch( $linkObjectID );
        $linkDatamap                    = $linkObject->dataMap();
        $url                            = $linkDatamap['url']->content();
        $delimiter                      = ( strpos($url, '?') === false ) ? '?' : '&';
        $url                           .= $delimiter.'ID=mmed45652&PASSWORD=medicus&NEWS=n';

        return $url;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:18,代码来源:externallinkhandlerovid.php

示例4: getNodeUrl

    /**
     * @param eZContentObjectTreeNode $node
     * @return string
     */
    public function getNodeUrl(&$node = null)
    {
        $url = '';
        if ( $node )
        {
            $dataMap                        = $node->dataMap();
            $mediaContentAttribute          = $dataMap['media_content'];
            $mediaContentAttributeContent   = $mediaContentAttribute->content();
            $linkObjectID                   = $mediaContentAttributeContent['relation_list'][0]['contentobject_id'];
            $linkObject                     = eZContentObject::fetch( $linkObjectID );
            $linkDatamap                    = $linkObject->dataMap();
            $url                            = $linkDatamap['url']->content();
        }

        return $url;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:20,代码来源:externallinkhandlerurl.php

示例5: addNews

 function addNews(eZContentObjectTreeNode $node)
 {
     $ini = eZINI::instance('xrowsitemap.ini');
     $news = new xrowSitemapItemNews();
     $images = array();
     // Adding the root node
     $object = $node->object();
     $news->publication_date = new DateTime('@' . $object->attribute('published'));
     $news->title = $object->attribute('name');
     $user = eZUser::fetch(eZUser::anonymousId());
     if (!xrowSitemapTools::checkAccess($object, $user, 'read')) {
         $news->access = 'Subscription';
     }
     // Get Genres, if enable
     if ((!$ini->hasVariable('NewsSitemapSettings', 'UseGenres') || $ini->hasVariable('NewsSitemapSettings', 'UseGenres') && $ini->variable('NewsSitemapSettings', 'UseGenres') != 'disable') && $ini->hasVariable('NewsSitemapSettings', 'Genres')) {
         $genres_array = $ini->variable('NewsSitemapSettings', 'Genres');
         // set genre if set
         if (isset($genres_array[$node->ClassIdentifier])) {
             $news->genres = array($genres_array[$node->ClassIdentifier]);
         }
     }
     $dm = $node->dataMap();
     $news->keywords = array();
     foreach ($dm as $attribute) {
         switch ($attribute->DataTypeString) {
             case 'xrowmetadata':
                 if ($attribute->hasContent()) {
                     $keywordattribute = $attribute->content();
                     $news->keywords = array_merge($news->keywords, $keywordattribute->keywords);
                 }
                 break;
             case 'ezkeyword':
                 if ($attribute->hasContent()) {
                     $keywordattribute = $attribute->content();
                     $news->keywords = array_merge($news->keywords, $keywordattribute->KeywordArray);
                 }
                 break;
         }
     }
     if ($ini->hasVariable('NewsSitemapSettings', 'AdditionalKeywordList')) {
         $news->keywords = array_merge($news->keywords, $ini->variable('NewsSitemapSettings', 'AdditionalKeywordList'));
     }
     return $news;
 }
开发者ID:rantoniazzi,项目名称:xrowmetadata,代码行数:44,代码来源:standardplugin.php

示例6: fetchChapterSection

    /**
     * @param eZContentObjectTreeNode $chapterNode
     * @return array
     */
    public static function fetchChapterSection( $chapterNode )
    {
        /* @type $dataMap eZContentObjectAttribute[] */
        $dataMap     = $chapterNode->dataMap();
        $serial      = $dataMap['serialized_taxonomies']->content();
        $remoteID    = $serial['section'][0];

        return self::fetchSection('remote', $remoteID);
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:13,代码来源:merckmanualfunctioncollection.php

示例7: getAbstract

 /**
  * @param eZContentObjectTreeNode $node
  * @param bool $check
  *
  * @return bool|string
  */
 public function getAbstract($node, $check = false)
 {
     $has_content = false;
     $text = false;
     $strLenFunc = function_exists('mb_strlen') ? 'mb_strlen' : 'strlen';
     $ini = eZINI::instance('ocoperatorscollection.ini');
     if ($node instanceof eZContentObjectTreeNode) {
         if ($node->hasAttribute('highlight')) {
             $text = $node->attribute('highlight');
             $text = str_replace(' ', ' ', $text);
             $text = str_replace(' ', ' ', $text);
             if ($strLenFunc($text) > 0) {
                 $has_content = true;
             }
         }
         if (!$has_content) {
             $attributes = $ini->hasVariable('Abstract', 'Attributes') ? $ini->variable('Abstract', 'Attributes') : array();
             if (!empty($attributes)) {
                 /** @var eZContentObjectAttribute[] $dataMap */
                 $dataMap = $node->dataMap();
                 foreach ($attributes as $attr) {
                     if (isset($dataMap[$attr])) {
                         if ($dataMap[$attr]->hasContent()) {
                             $tpl = eZTemplate::factory();
                             $tpl->setVariable('attribute', $dataMap[$attr]);
                             $designPath = "design:content/datatype/view/" . $dataMap[$attr]->attribute('data_type_string') . ".tpl";
                             $text = $tpl->fetch($designPath);
                             $text = str_replace(' ', ' ', $text);
                             if ($strLenFunc(strip_tags($text)) > 0) {
                                 $has_content = true;
                             }
                             break;
                         }
                     }
                 }
             }
         }
     }
     if ($check) {
         return $has_content;
     } else {
         return $text;
     }
 }
开发者ID:OpencontentCoop,项目名称:ocoperatorscollection,代码行数:50,代码来源:ocoperatorscollection.php


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