@@ 70-79 (lines=10) @@ | ||
67 | return false; |
|
68 | } |
|
69 | ||
70 | public function generatePath($entity) |
|
71 | { |
|
72 | foreach ($this->linkGenerators as $generator) { |
|
73 | if ($generator->supports($entity)) { |
|
74 | return $generator->generate($entity); |
|
75 | } |
|
76 | } |
|
77 | ||
78 | throw new \RuntimeException(sprintf('The entity "%s" has no link generator.', get_class($entity))); |
|
79 | } |
|
80 | ||
81 | public function getLinkname($entity) |
|
82 | { |
|
@@ 81-90 (lines=10) @@ | ||
78 | throw new \RuntimeException(sprintf('The entity "%s" has no link generator.', get_class($entity))); |
|
79 | } |
|
80 | ||
81 | public function getLinkname($entity) |
|
82 | { |
|
83 | foreach ($this->linkGenerators as $generator) { |
|
84 | if ($generator->supports($entity)) { |
|
85 | return $generator->getLinkname($entity); |
|
86 | } |
|
87 | } |
|
88 | ||
89 | throw new \RuntimeException(sprintf('The entity "%s" has no link generator.', get_class($entity))); |
|
90 | } |
|
91 | ||
92 | public function getName() |
|
93 | { |