src/Model/ApiResourceBase.php
public function operationAvailable($op, $refreshDuringCheck = false)
    {
        // Ensure this resource is a full representation.
        if (!$this->isFull) {
            $this->refresh();
            $refreshDuringCheck = false;
        }

        // Check if the operation is available in the HAL links.
        $available = $this->isOperationAvailable($op);
        if ($available) {
            return true;
        }

        // If not, and $refreshDuringCheck is on, then refresh the resource.
        if ($refreshDuringCheck) {
            $this->refresh();
            $available = $this->isOperationAvailable($op);
        }

        return $available;
    }
public function operationAvailable($op, $refreshDuringCheck = false)
    {
        // Ensure this resource is a full representation.
        if (!$this->isFull) {
            $this->refresh();
            $refreshDuringCheck = false;
        }

        // Check if the operation is available in the HAL links.
        $available = $this->isOperationAvailable($op);
        if ($available) {
            return true;
        }

        // If not, and $refreshDuringCheck is on, then refresh the resource.
        if ($refreshDuringCheck) {
            $this->refresh();
            $available = $this->isOperationAvailable($op);
        }

        return $available;
    }
public function operationAvailable ( $ op , $ refreshDuringCheck = false ) { // Ensure this resource is a full representation. if ( ! $ this -> isFull ) { $ this -> refresh ( ) ; $ refreshDuringCheck = false ; } // Check if the operation is available in the HAL links. $ available = $ this -> isOperationAvailable ( $ op ) ; if ( $ available ) { return true ; } // If not, and $refreshDuringCheck is on, then refresh the resource. if ( $ refreshDuringCheck ) { $ this -> refresh ( ) ; $ available = $ this -> isOperationAvailable ( $ op ) ; } return $ available ; }
Check whether an operation is available on the resource.

@param string $op
@param bool   $refreshDuringCheck

@return bool
Check whether an operation is available on the resource .