24 if (is_null($obj_adapter)) {
49 $news->setUserId($this->_deps->user()->getId());
63 $obj_id = $this->_deps->obj()->getObjIdForRefId($ref_id);
64 $obj_type = $this->_deps->obj()->getTypeForObjId($obj_id);
65 return new ilNewsContext($obj_id, $obj_type, $subid, $subtype);
Wraps ilObject dependencies.
Interface for ilObject dependency.
item(ilNewsContext $context)
Get a new news item for a context.
__construct(ilLanguage $lng, ilSetting $settings, ilObjUser $user, ilNewsObjectAdapterInterface $obj_adapter=null)
Constructor.
getSubId()
Get Sub Obj Id.
getObjType()
Get Obj Type.
News service dependencies.
contextForRefId(int $ref_id, int $subid=0, string $subtype="")
Get context object for news.
getSubType()
Get Sub Obj Type.