| @@ 204-207 (lines=4) @@ | ||
| 201 | ||
| 202 | $method = $this->getOption('method');
|
|
| 203 | ||
| 204 | if (!method_exists($this->getOption('model'), $method))
|
|
| 205 | {
|
|
| 206 | throw new RuntimeException(sprintf('Class "%s" must implement a "%s" method to be rendered in a "%s" widget', $this->getOption('model'), $method, __CLASS__));
|
|
| 207 | } |
|
| 208 | ||
| 209 | return !is_null($object) ? $object->$method() : ''; |
|
| 210 | } |
|
| @@ 80-83 (lines=4) @@ | ||
| 77 | $objects = $criteria->find($this->getOption('connection')); |
|
| 78 | ||
| 79 | $methodKey = $this->getOption('key_method'); |
|
| 80 | if (!method_exists($this->getOption('model'), $methodKey)) |
|
| 81 | { |
|
| 82 | throw new RuntimeException(sprintf('Class "%s" must implement a "%s" method to be rendered in a "%s" widget', $this->getOption('model'), $methodKey, __CLASS__)); |
|
| 83 | } |
|
| 84 | ||
| 85 | $methodValue = $this->getOption('method'); |
|
| 86 | if (!method_exists($this->getOption('model'), $methodValue)) |
|
| @@ 86-89 (lines=4) @@ | ||
| 83 | } |
|
| 84 | ||
| 85 | $methodValue = $this->getOption('method'); |
|
| 86 | if (!method_exists($this->getOption('model'), $methodValue)) |
|
| 87 | { |
|
| 88 | throw new RuntimeException(sprintf('Class "%s" must implement a "%s" method to be rendered in a "%s" widget', $this->getOption('model'), $methodValue, __CLASS__)); |
|
| 89 | } |
|
| 90 | ||
| 91 | foreach ($objects as $object) |
|
| 92 | { |
|