constructEventsArray() static public method

Call populatePlanning functions for all $CFG_GLPI['planning_types'] types
Since: 9.1
static public constructEventsArray ( array $options = [] ) : array
$options array with this keys: - begin: mandatory, planning start. (should be an ISO_8601 date, but could be anything wo can be parsed by strtotime) - end: mandatory, planning end. (should be an ISO_8601 date, but could be anything wo can be parsed by strtotime) - display_done_events: default true, show also events tagged as done
return array $events : array with events in fullcalendar.io format
Example #1
0
You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkCentralAccess();
if (!isset($_REQUEST["action"])) {
    exit;
}
if ($_REQUEST["action"] == "get_events") {
    header("Content-Type: application/json; charset=UTF-8");
    echo json_encode(Planning::constructEventsArray($_REQUEST));
    exit;
}
if ($_REQUEST["action"] == "update_event_times") {
    echo Planning::updateEventTimes($_REQUEST);
    exit;
}
Html::header_nocache();
header("Content-Type: text/html; charset=UTF-8");
if ($_REQUEST["action"] == "add_event_fromselect") {
    Planning::showAddEventForm($_REQUEST);
}
if ($_REQUEST["action"] == "add_event_sub_form") {
    Planning::showAddEventSubForm($_REQUEST);
}
if ($_REQUEST["action"] == "add_planning_form") {