Revision 4d9d7d51
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/ClientJS.pm | ||
---|---|---|
98 | 98 |
return $self->_actions; |
99 | 99 |
} |
100 | 100 |
|
101 |
sub render { |
|
102 |
my ($self, $controller) = @_; |
|
103 |
return $controller->render(\$self->to_json, { type => 'json' }); |
|
104 |
} |
|
105 |
|
|
101 | 106 |
1; |
102 | 107 |
__END__ |
103 | 108 |
|
... | ... | |
198 | 203 |
Returns the actions gathered so far as a JSON string ready to be sent |
199 | 204 |
to the client. |
200 | 205 |
|
206 |
=item C<render $controller> |
|
207 |
|
|
208 |
Renders C<$self> via the controller. Useful for chaining. Equivalent |
|
209 |
to the following: |
|
210 |
|
|
211 |
$controller->render(\$self->to_json, { type => 'json' }); |
|
212 |
|
|
201 | 213 |
=back |
202 | 214 |
|
203 | 215 |
=head1 FUNCTIONS EVALUATED ON THE CLIENT SIDE |
Auch abrufbar als: Unified diff
ClientJS: render()-Funktion zum noch besseren Chaining