/**
  * @param KeywordInterface $keyword
  *
  * @return FacadeInterface
  *
  * @throws TransformerParameterTypeException
  */
 public function transform($keyword)
 {
     if (!$keyword instanceof KeywordInterface) {
         throw new TransformerParameterTypeException();
     }
     $facade = $this->newFacade();
     $facade->id = $keyword->getId();
     $facade->label = $keyword->getLabel();
     $facade->addRight('can_edit', $this->authorizationChecker->isGranted(ContributionActionInterface::EDIT, $keyword));
     $can_delete = $this->authorizationChecker->isGranted(ContributionActionInterface::DELETE, $keyword) && !$keyword->isUsed();
     $facade->addRight('can_delete', $can_delete);
     return $facade;
 }
 /**
  * @param string           $message
  * @param KeywordInterface $keyword
  */
 protected function sendLog($message, KeywordInterface $keyword)
 {
     $this->logger->info($message, array('keyword_label' => $keyword->getLabel()));
 }