Horde_Date_Recurrence::getRecurName PHP Method

getRecurName() public method

Returns a description of this event's recurring type.
public getRecurName ( ) : string
return string Human readable recurring type.
    public function getRecurName()
    {
        switch ($this->getRecurType()) {
            case self::RECUR_NONE:
                return Horde_Date_Translation::t("No recurrence");
            case self::RECUR_DAILY:
                return Horde_Date_Translation::t("Daily");
            case self::RECUR_WEEKLY:
                return Horde_Date_Translation::t("Weekly");
            case self::RECUR_MONTHLY_DATE:
            case self::RECUR_MONTHLY_WEEKDAY:
            case self::RECUR_MONTHLY_LAST_WEEKDAY:
                return Horde_Date_Translation::t("Monthly");
            case self::RECUR_YEARLY_DATE:
            case self::RECUR_YEARLY_DAY:
            case self::RECUR_YEARLY_WEEKDAY:
                return Horde_Date_Translation::t("Yearly");
        }
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Returns a description of this event's recurring type.
  *
  * @return string  Human readable recurring type.
  */
 public function getRecurName()
 {
     if (empty($this->baseid)) {
         return $this->recurs() ? $this->recurrence->getRecurName() : _("No recurrence");
     } else {
         return _("Exception");
     }
 }