/** * Converts the datalist to html code. * * @param string $prepend Optional string prepended to html content * @param string $append Optional string appended to html content * * @return string */ public function toHtml($prepend = '', $append = '') { //Do not print empty datalists if (!$this->count() && strlen($prepend . $append) === 0) { return ''; } return parent::toHtml($prepend, $append); }
/** * {@inheritdoc} * * @see ElementContainer::toHtml */ protected function defaultRender($prepend = '', $append = '') { return parent::toHtml($prepend, $append); }