setEmbedded(TRUE); $controller->reset(); $controller->set('context', 'user'); $controller->set('cid', $this->_contactId); // Limit to status "Scheduled" and "Available" $controller->set('status', ['IN' => [1, 7]]); $controller->set('activity_role', 2); $controller->set('force', 1); $controller->process(); $controller->run(); return FALSE; } /** * The main function that is called when the page loads. * * It decides the which action has to be taken for the page. */ public function run() { parent::preProcess(); $this->listActivities(); } }