/**
  * Shows one particular activity
  * @param null $activity_id
  */
 public function actionView($activity_id = null)
 {
     $activity_id = intval($activity_id);
     if ($activity_id < 1) {
         Apollo::getInstance()->getRequest()->error(400, 'Invalid activity ID!');
     } else {
         $breadcrumbs = [['Activities', URLHelper::url('activity/view/' . $activity_id), true], ['Activity name (Activity ID)', null, true]];
         View::render('activity.activity', 'View Activity', $breadcrumbs);
     }
 }
 /**
  * Default function that is called if no action is specified
  *
  * @since 0.0.2 Changed to function since GenericController is no longer an interface
  * @since 0.0.1
  */
 public function index()
 {
     View::render('help.index', 'Help', [['Help', URLHelper::url('help'), true]]);
 }
 /**
  * Sends the specified HTTP response code and renders the error view.
  *
  * @param int $status_code
  * @param string $message
  * @since 0.0.7 Now using the new View::render() shorthand and die() to kill the app
  * @since 0.0.5
  */
 public function error($status_code, $message)
 {
     http_response_code($status_code);
     $breadcrumbs = [['Error #' . $status_code, null, true]];
     View::render('error', 'Error #' . $status_code, $breadcrumbs, ['status_code' => $status_code, 'message' => $message]);
     die;
 }
 /**
  * Deals with user settings
  *
  * @since 0.0.3
  */
 public function actionSettings()
 {
     $breadcrumbs = [['User', null, false], ['Settings', null, true]];
     View::render('user.settings', 'Settings', $breadcrumbs);
 }
 /**
  * Shows the list of all records
  *
  * @since 0.0.4 Changed filenames
  * @since 0.0.2 Now using the View::render() shorthand
  * @since 0.0.1
  */
 public function index()
 {
     $breadcrumbs = [['Fields', URLHelper::url('field'), true]];
     View::render('field.index', 'Fields', $breadcrumbs);
 }
 /**
  * Action to deal with advanced search
  *
  * @since 0.0.8
  */
 public function actionSearch()
 {
     $breadcrumbs = [['Records', URLHelper::url('record'), true], ['Advanced Search', null, true]];
     View::render('record.search', 'Advanced Search', $breadcrumbs);
 }