/** * copy the properties of the attribute into * the attribute that is the subject of * this facade * * @param Attribute $subject * * @return self */ public function copy(EntityInterface $template) { /* * run dependency check */ if ($this->hasDependencies()) { $entity = $this->entity; $entity->setValue($template->getValue()); /* * if the subject has been removed but the copy is not removed */ if ($entity->getRemoved() != null && $template->getRemoved() == null) { $entity->clearRemoved(); } } return $this; }