public function process(\Pagemill_Tag $tag, \Pagemill_Data $data, \Pagemill_Stream $stream) { $pmBody = Typeframe_TagPreprocessor_Export::Export('body'); if ($pmBody) { foreach ($pmBody[0]->attributes() as $key => $value) { $tag->setAttribute($key, $value); } } }
public function children() { $name = $this->getAttribute('name'); $imports = Typeframe_TagPreprocessor_Export::Export($name); $children = array(); if ($imports) { foreach ($imports as $import) { $children = array_merge($children, $import->children()); } } else { throw new Exception("Exported tag '{$name}' not found"); } return $children; }