public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = false, $mode = null, $entry_id = null)
    {
        $wrapper->appendChild(new XMLElement($this->get('element_name'), ($encode ?
                              General::sanitize($this->prepareReadableValue($data, $entry_id)) :
                              $this->prepareReadableValue($data, $entry_id))));
    }
public function appendFormattedElement(XMLElement &$wrapper, $data, $encode = false, $mode = null, $entry_id = null)
    {
        $wrapper->appendChild(new XMLElement($this->get('element_name'), ($encode ?
                              General::sanitize($this->prepareReadableValue($data, $entry_id)) :
                              $this->prepareReadableValue($data, $entry_id))));
    }
public function appendFormattedElement ( XMLElement & $ wrapper , $ data , $ encode = false , $ mode = null , $ entry_id = null ) { $ wrapper -> appendChild ( new XMLElement ( $ this -> get ( 'element_name' ) , ( $ encode ? General :: sanitize ( $ this -> prepareReadableValue ( $ data , $ entry_id ) ) : $ this -> prepareReadableValue ( $ data , $ entry_id ) ) ) ) ; }
Append the formatted XML output of this field as utilized as a data source.

Since Symphony 2.5.0, it will defaults to `prepareReadableValue` return value.

@param XMLElement $wrapper
the XML element to append the XML representation of this to.
@param array $data
the current set of values for this field. the values are structured as
for displayPublishPanel.
@param boolean $encode (optional)
flag as to whether this should be html encoded prior to output. this
defaults to false.
@param string $mode
A field can provide ways to output this field's data. For instance a mode
could be 'items' or 'full' and then the function would display the data
in a different way depending on what was selected in the datasource
included elements.
@param integer $entry_id (optional)
the identifier of this field entry instance. defaults to null.
Append the formatted XML output of this field as utilized as a data source .