Created
February 24, 2009 12:28
-
-
Save davidreuss/69546 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyController extends Zend_Controller_Action { | |
public $contexts = array( | |
'request' => array('json', 'html') | |
); | |
public function requestAction() { | |
$this->view->fields = Foo::getFields(); | |
// Here i want to build the form - but ONLY if context is 'html' | |
// Should there be an if statement right here, or could it be configured | |
// Somewhere else? | |
// Something like: | |
// if ($context == 'html') { | |
// $this->view->form = new My_Form(); | |
// } | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment