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


PHP Page::setAttribute方法代码示例

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


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

示例1: publish

 public function publish(CollectionKey $ak, Page $page, AttributeValue $value)
 {
     $inspector = \Core::make('import/value_inspector');
     $result = $inspector->inspect($value->getValue());
     $content = $result->getReplacedContent();
     $page->setAttribute($ak->getAttributeKeyHandle(), $content);
 }
开发者ID:motoki1199,项目名称:addon_migration_tool,代码行数:7,代码来源:StandardPublisher.php

示例2: publish

 public function publish(CollectionKey $ak, Page $page, AttributeValue $value)
 {
     $links = $value->getValue();
     $r = array();
     foreach ($links as $link) {
         $r[$link['service']] = $link['detail'];
     }
     $page->setAttribute($ak->getAttributeKeyHandle(), $r);
 }
开发者ID:motoki1199,项目名称:addon_migration_tool,代码行数:9,代码来源:SocialLinksPublisher.php

示例3: publish

 public function publish(CollectionKey $ak, Page $page, AttributeValue $value)
 {
     $inspector = \Core::make('import/value_inspector');
     $result = $inspector->inspect($value->getValue());
     $items = $result->getMatchedItems();
     if (isset($items[0]) && $items[0] instanceof FileItem) {
         $file = $items[0]->getContentObject();
         $page->setAttribute($ak->getAttributeKeyHandle(), $file);
     }
 }
开发者ID:motoki1199,项目名称:addon_migration_tool,代码行数:10,代码来源:ImageFilePublisher.php

示例4: publish

 /**
  * @param CollectionKey $ak
  * @param Page $page
  * @param AddressAttributeValue $address
  */
 public function publish(CollectionKey $ak, Page $page, AttributeValue $address)
 {
     $value = new Value();
     $value->address1 = $address->getAddress1();
     $value->address2 = $address->getAddress2();
     $value->address3 = $address->getAddress3();
     $value->city = $address->getCity();
     $value->country = $address->getCountry();
     $value->state_province = $address->getStateProvince();
     $value->postal_code = $address->getPostalCode();
     $page->setAttribute($ak->getAttributeKeyHandle(), $value);
 }
开发者ID:motoki1199,项目名称:addon_migration_tool,代码行数:17,代码来源:AddressPublisher.php

示例5: publishToPage

 public function publishToPage(Page $c, $data, $controls)
 {
     // the data for this actually doesn't come from $data. Attributes have their own way of gettin data.
     $ak = $this->getAttributeKeyObject();
     if (is_object($ak)) {
         $controller = $ak->getController();
         $value = $controller->createAttributeValueFromRequest();
         $c->setAttribute($ak, $value);
     }
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:10,代码来源:CollectionAttributeControl.php

示例6: publish

 public function publish(CollectionKey $ak, Page $page, AttributeValue $value)
 {
     $node = simplexml_load_string($value->getValue());
     $page->setAttribute($ak->getAttributeKeyHandle(), $ak->getController()->importValue($node));
 }
开发者ID:motoki1199,项目名称:addon_migration_tool,代码行数:5,代码来源:CIFPublisher.php

示例7: setAttribute

 public function setAttribute($ak, $value)
 {
     return parent::setAttribute($ak, $value);
 }
开发者ID:BacLuc,项目名称:newGryfiPage,代码行数:4,代码来源:__IDE_SYMBOLS__.php


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