Knp\Bundle\KnpBundlesBundle\Entity\Activity::getDeveloper PHP Method

getDeveloper() public method

public getDeveloper ( ) : null | Developer
return null | Developer
    public function getDeveloper()
    {
        return $this->developer;
    }

Usage Example

Example #1
0
 /**
  * @param Activity $activity
  *
  * @return boolean
  */
 public function isEqualTo(Activity $activity)
 {
     if ($activity->getBundle()->getId() !== $this->bundle->getId()) {
         return false;
     }
     // Compare developers only if actual activity has one
     if (null !== $this->developer && $activity->getDeveloper()->getId() !== $this->developer->getId()) {
         return false;
     }
     if ($activity->getType() !== $this->type) {
         return false;
     }
     if ($activity->getState() !== $this->state) {
         return false;
     }
     // Compare dates only when state of activity allows it
     if (self::STATE_FIXED !== $this->state && $activity->getCreatedAt()->getTimestamp() !== $this->createdAt->getTimestamp()) {
         return false;
     }
     return true;
 }