Documentation

addToFavorite

public function addToFavorite($parameters = array('AFFECT_CHILDREN' => true))

This method adds the task to Favorites

Parameters

ParameterDescription
PARAMETERSArray that contains the AFFECT_CHILDREN key. If the key value is true, then subtasks of this task will be added to the Favorites as well. If false, then they will not be included.

Returned value

This method returns true if adding was successful, otherwise returns false.

Example of use

   // adding to favorites  
   $task = new CTaskItem(10, $GLOBALS['USER']->GetId()); 
   $task->addToFavorite(); 

© «Bitrix24», 2001-2024