Ejemplo n.º 1
0
 public function setScope(kScope $scope)
 {
     if ($this->content instanceof kStringField) {
         $this->content->setScope($scope);
     }
     $this->data = $this->content->getValue();
     $replace = $scope->getDynamicValues('{', '}');
     $search = array_keys($replace);
     $this->data = str_replace($search, $replace, $this->data);
 }
 public function getScopedProviderJobData(kScope $scope = null)
 {
     $ret = new kEmailNotificationCategoryRecipientJobData();
     if (!$this->categoryId) {
         return $ret;
     }
     if ($this->categoryId instanceof kStringField) {
         $this->categoryId->setScope($scope);
     }
     $implicitCategoryId = $this->categoryId->getValue();
     $categoryUserFilter = new categoryKuserFilter();
     $categoryUserFilter->set('_matchor_permission_names', PermissionName::CATEGORY_SUBSCRIBE);
     if ($this->categoryUserFilter) {
         $categoryUserFilter = $this->categoryUserFilter;
     }
     $categoryUserFilter->setCategoryIdEqual($implicitCategoryId);
     $ret->setCategoryUserFilter($categoryUserFilter);
     return $ret;
 }