/** * Sets the value of an attribute with the value of another attribute, * for instance equalizing the name and id attributes for the form tag * * @param DOMElement $domElement DOM element of the specific HTML tag * @param string $key Key of the attribute which needs to be changed * @param string $other Key of the attribute to take the value from * @return unknown_type */ public function setAttributeWithValueofOtherAttribute(\DOMElement $domElement, $key, $other) { $value = htmlspecialchars($this->model->getAttributeValue((string) $other), ENT_QUOTES); if (!empty($value)) { $domElement->setAttribute($key, $value); } }
/** * @return string */ public function getInputValue() { if (method_exists($this->model, 'getData')) { $inputValue = nl2br($this->model->getData(), TRUE); } else { $inputValue = $this->model->getAttributeValue('value'); } return $inputValue; }
public function getInputValue() { if (method_exists($this->model, 'getData')) { $inputValue = nl2br($this->model->getData(), TRUE); } else { $inputValue = $this->model->getAttributeValue('value'); } return htmlspecialchars($inputValue, ENT_QUOTES); }