Exemplo n.º 1
0
 private function isAllowedForArea(Entity $entity, MembershipEntityInterface $who, $editable = false)
 {
     if ($entity->getType() == 'Area') {
         if (!$editable || $this->settings->get(MilestoneSettings::AREA_CAN_UPDATE_OWN_PROGRESS)->getValue()) {
             return $who->getEntity()->getId() == $entity->getId();
         }
     }
     return false;
 }
Exemplo n.º 2
0
 /**
  * Defines a filter for extension point implementations, which allows only the specified
  * service, which is read from project settings
  * 
  * @param ProjectSettings $settings Settings storage
  * @param string $key setting name
  * @return ExtensionPointFilter
  */
 public function fromSettings(ProjectSettings $settings, $key)
 {
     return $this->withServices([$settings->get($key)->getValue()]);
 }