OphTrOperationbooking_Operation_Ward::getRestrictionText PHP Méthode

getRestrictionText() public méthode

public getRestrictionText ( )
    public function getRestrictionText()
    {
        $restrictions = array();
        if ($this->restriction & self::RESTRICTION_MALE) {
            $restrictions[] = '[MALE]';
        }
        if ($this->restriction & self::RESTRICTION_FEMALE) {
            $restrictions[] = '[FEMALE]';
        }
        if ($this->restriction & self::RESTRICTION_CHILD) {
            $restrictions[] = '[CHILD]';
        }
        if ($this->restriction & self::RESTRICTION_ADULT) {
            $restrictions[] = '[ADULT]';
        }
        if ($this->restriction & self::RESTRICTION_OBSERVATION) {
            $restrictions[] = '[OBS]';
        }
        if (empty($restrictions)) {
            return 'None';
        }
        return implode(' ', $restrictions);
    }