/** * Are there any errors on this page? * @return bool */ public function isError() { $buffer = $this->doc->getBuffer('message'); if (is_array($buffer)) { $bufferWords = JString::trim(strip_tags(current($buffer['message']))); } else { $bufferWords = JString::trim(strip_tags($buffer)); } return !empty($bufferWords); }
/** * @testdox Test the default return for getBuffer is null */ public function testTheDefaultReturnForGetBufferIsNull() { $this->assertNull($this->object->getBuffer()); }
/** * Get the contents of a document include * * @param string $type The type of renderer * @param string $name The name of the element to render * @param array $attribs Associative array of remaining attributes. * * @return The output of the renderer */ public function getBuffer($type = null, $name = null, $attribs = array()) { if ($type == 'head' || $type == 'component') { return parent::getBuffer($type, $name, $attribs); } else { return ''; } }