Exemple #1
0
 public function __construct(WordKey $wordKeyElement)
 {
     // id
     $id = new Id('id');
     $id->setRequired(true);
     $this->add($id);
     // langId
     $langId = new Id('langId');
     $langId->setRequired(true);
     $this->add($langId);
     // key
     $this->add($wordKeyElement);
     // translate
     $translate = new Text('translate', 1, 500);
     $translate->setRequired(true);
     $translate->getFilterChain()->attachByName('StringTrim');
     $this->add($translate);
 }