[TYPO3-english] Extend model in an extbase extension (powermail)
Brian Bendtsen
bb at bellevuevej.dk
Mon Jul 15 11:12:03 CEST 2013
I'm trying to extend powermail (version 2) with the possibility to add a
note for each input field. So far I have created a new extension using
extension builder and with a few modifications to ext_tables.php the
field show up in the backend. The new field is called 'note' and I
thought I could just do something like {field.note} in the fluid
template input.html, but that doesn't work. My model includes the setter
and getter:
class Tx_Formnotes_Domain_Model_Powermailnotes extends
Tx_Extbase_DomainObject_AbstractEntity {
/**
* note
*
* @var string
*/
protected $note;
/**
* Returns the note
*
* @return string $note
*/
public function getNote() {
return $this->note;
}
/**
* Sets the note
*
* @param string $note
* @return void
*/
public function setNote($note) {
$this->note = $note;
}
}
I can copy this code to powermail/Classes/Domain/Model/Fields.php and
the {field.note} works, but that is of course not the right way to do it.
Info: I'm using TYPO3 4.7
More information about the TYPO3-english
mailing list