Example #1
0
 /**
  * Applies this change
  *
  * @return void
  */
 public function apply()
 {
     if ($this->canApply()) {
         $node = $this->getSubject();
         $value = $this->nodePropertyConversionService->convert($node->getNodeType(), $this->getPropertyName(), $this->getValue(), $node->getContext());
         $node->setProperty($this->getPropertyName(), $value);
         $this->updateWorkspaceInfo();
     }
 }
Example #2
0
 /**
  * Applies this change
  *
  * @return void
  */
 public function apply()
 {
     if ($this->canApply()) {
         $node = $this->getSubject();
         $value = $this->nodePropertyConversionService->convert($node->getNodeType(), $this->getPropertyName(), $this->getValue(), $node->getContext());
         $node->setProperty($this->getPropertyName(), $value);
         $this->updateWorkspaceInfo();
         if ($node->getNodeType()->getConfiguration('properties.' . $this->getPropertyName() . '.ui.reloadIfChanged')) {
             $this->reloadDocument();
         }
     }
 }