CalendarSegment::prepareInputForAdd PHP Method

prepareInputForAdd() public method

public prepareInputForAdd ( $input )
    function prepareInputForAdd($input)
    {
        // Check override of segment : do not add
        if (count(self::getSegmentsBetween($input['calendars_id'], $input['day'], $input['begin'], $input['day'], $input['end'])) > 0) {
            Session::addMessageAfterRedirect(__('Can not add a range riding an existing period'), false, ERROR);
            return false;
        }
        return parent::prepareInputForAdd($input);
    }