예제 #1
0
 /**
  * Generate rout for entity (using entity config)
  *
  * @param Reminder $reminder
  * @return string
  */
 public function getUrl(Reminder $reminder)
 {
     $metadata = $this->manager->getEntityMetadata($reminder->getRelatedEntityClassName());
     if (isset($metadata)) {
         if (!empty($metadata->routeView)) {
             return $this->router->generate($metadata->routeView, array('id' => $reminder->getRelatedEntityId()));
         }
         if (!empty($metadata->routeName)) {
             return $this->router->generate($metadata->routeName);
         }
     }
     return '';
 }
예제 #2
0
 /**
  * @param Reminder $reminder
  * @return string
  */
 protected function getTemplateId(Reminder $reminder)
 {
     $className = $reminder->getRelatedEntityClassName();
     $identifier = $this->configProvider->getConfig($className)->get('reminder_flash_template_identifier');
     return $identifier ?: self::DEFAULT_IDENTIFIER;
 }