private function formatWarningMessage() { $object = Type::stringify($this->element); if (!$this->configuration) { $this->configuration = parse_ini_file("validator_warning_messages.ini", true); } $simple_class_name = substr(strrchr($this->element->getClassName(), '\\'), 1); if (!isset($this->configuration['warning_messages'][$simple_class_name])) { $message = 'Invalid content on the object.'; } else { $message = $this->configuration['warning_messages'][$simple_class_name]; } return $message; }
public function render($doctype = '<!doctype html>', $format = false) { return parent::render($doctype, $format); }
public function getContextClass() { return Element::getClassName(); }
/** * Implements the Container::getContainerChildren(). * * @see Container::getContainerChildren() * @return array of Paragraph|RelatedArticles */ public function getContainerChildren() { $children = array(); if ($this->credits) { if (is_array($this->credits)) { foreach ($this->credits as $paragraph) { if (Type::is($paragraph, Element::getClassName())) { $children[] = $paragraph; } } } else { if (Type::is($this->credits, Element::getClassName())) { $children[] = $this->credits; } } } if ($this->relatedArticles) { $children[] = $this->relatedArticles; } return $children; }