/** * {@inheritdoc} */ public function addMeta($meta, $value = null) { if (null === $value) { $this->_doc->addCustomTag($meta); } else { $this->_doc->setMetadata($meta, $value); } }
/** * @param string|array $metaRows * @return $this */ public function meta($metaRows) { if (is_array($metaRows)) { foreach ($metaRows as $metaRow) { $this->meta($metaRow); } } else { $data = $this->doc->getHeadData(); if (!in_array($metaRows, $data['custom'])) { $this->doc->addCustomTag($metaRows); } } return $this; }
/** * Test... * * @return void */ public function testAddCustomTag() { $this->object->addCustomTag("\t <script>var html5 = true;</script>\r\n"); $this->assertThat(in_array('<script>var html5 = true;</script>', $this->object->_custom), $this->isTrue(), 'JDocumentHtml::addCustomTag did not work'); }
/** * @testdox Test that addCustomTag returns an instance of $this */ public function testEnsureAddCustomTagReturnsThisObject() { $this->assertSame($this->object, $this->object->addCustomTag("\t <script>var html5 = true;</script>\r\n")); }