loader->register('ElementRepeatable', 'elements:repeatable/repeatable.php'); /* Class: ElementText The text element class */ class ElementText extends ElementRepeatable implements iRepeatSubmittable { /* Function: _hasValue Checks if the repeatables element's value is set. Parameters: $params - render parameter Returns: Boolean - true, on success */ protected function _hasValue($params = array()) { $value = $this->get('value', $this->config->get('default')); return !empty($value) || $value === '0'; } /* Function: _getSearchData Get repeatable elements search data. Returns: String - Search data */ protected function _getSearchData() { return $this->get('value', $this->config->get('default')); } /* Function: _edit Renders the repeatable edit form field. Returns: String - html */ protected function _edit() { return $this->app->html->_('control.text', $this->getControlName('value'), $this->get('value', $this->config->get('default')), 'size="60" maxlength="255"'); } /* Function: _renderSubmission Renders the element in submission. Parameters: $params - AppData submission parameters Returns: String - html */ public function _renderSubmission($params = array()) { return $this->_edit(); } }