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);
 }
 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);
 }
 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);
     }
 }
 public function publish(CollectionKey $ak, Page $page, AttributeValue $value)
 {
     $node = simplexml_load_string($value->getValue());
     $page->setAttribute($ak->getAttributeKeyHandle(), $ak->getController()->importValue($node));
 }