Example #1
0
 /**
  * Determines, if the given object is of type Customer and if it is related to the contract.
  *
  * @param Contract $contract The current contract identified by provided the access token.
  * @param mixed    $object   The object to be handled
  *
  * @return bool
  */
 protected function grantByCustomer(Contract $contract, $object)
 {
     if ($object instanceof \GravitonDyn\CustomerBundle\Document\Customer) {
         return $contract->getCustomer() == $object;
     }
     return false;
 }
 /**
  * Provides the »IBVertragsnummer« of the current contract.
  *
  * @return string
  */
 public function getContractNumber()
 {
     return $this->contract->getNumber();
 }