/**
  * Add request from poster to parent
  *
  * @param string           $type
  * @param PosterInterface  $poster
  * @param PosterInterface  $parent
  * @param ContentInterface $object
  *
  * @return \Platform\Invitation\Model\Invitation
  */
 public function addRequest($type, PosterInterface $poster, PosterInterface $parent, ContentInterface $object = null)
 {
     $data = ['type_id' => $type, 'poster_id' => $poster->getId(), 'user_id' => $poster->getUserId(), 'parent_id' => $parent->getId(), 'parent_user_id' => $parent->getUserId(), 'poster_type' => $poster->getType(), 'parent_type' => $parent->getType(), 'created_at' => KENDO_DATE_TIME];
     if (null != $object) {
         $data = array_merge($data, ['object_id' => $object->getId(), 'object_type' => $object->getType()]);
     }
     $request = new Invitation($data);
     $request->save();
     return $request;
 }