Exemple #1
0
 /**
  * Test
  *
  * @return void
  */
 public function testGetEvents()
 {
     $model = new Model();
     $model->setContent('test');
     $model->setTemplateId(1);
     $model->save();
     $this->assertInternalType('array', $this->object->getEvents());
 }
Exemple #2
0
 /**
  * Render template from event params
  *
  * @param string  $content    Content
  * @param integer $templateId Template id
  * @param integer $userId     User id
  *
  * @return array
  */
 public function addEvent($content, $templateId, $userId)
 {
     $eventTable = new Event\Model();
     $eventTable->setUserId($userId);
     $eventTable->setTemplateId($templateId);
     $eventTable->setContent($content);
     $eventTable->save();
 }