Baikal\Model\Calendar::get PHP Méthode

get() public méthode

public get ( $sPropName )
    function get($sPropName)
    {
        if ($sPropName === "todos") {
            # TRUE if components contains VTODO, FALSE otherwise
            if (($sComponents = $this->get("components")) !== "") {
                $aComponents = explode(",", $sComponents);
            } else {
                $aComponents = [];
            }
            return in_array("VTODO", $aComponents);
        }
        if ($sPropName === "notes") {
            # TRUE if components contains VJOURNAL, FALSE otherwise
            if (($sComponents = $this->get("components")) !== "") {
                $aComponents = explode(",", $sComponents);
            } else {
                $aComponents = [];
            }
            return in_array("VJOURNAL", $aComponents);
        }
        return parent::get($sPropName);
    }

Usage Example

Exemple #1
0
 public function linkDeleteConfirm(\Baikal\Model\Calendar $oModel)
 {
     return self::buildRoute(array("user" => $this->currentUserId(), "delete" => $oModel->get("id"), "confirm" => 1)) . "#message";
 }