<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[
<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[
Zend_Controller_Scaffolding will provide quick scaffolding features (that every mature framework has) by extending Zend_Controller_Action class. The component has a real code base (https://github.com/lex0r/zendscaffolding) and is used in several projects. Guthub Project: https://github.com/lex0r/zendscaffoldingZend Framework: Zend_Controller_Scaffolding Component Proposal
Proposed Component Name
Zend_Controller_Scaffolding
Developer Notes
http://framework.zend.com/wiki/display/ZFDEV/Zend_Controller_Scaffolding
Proposers
Alex Oroshchuk
Zend Liaison
TBD
Revision
1.0 - Aug 2010: Initial Draft. (wiki revision: 20)
Table of Contents
1. Overview
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
4. Dependencies on Other Framework Components
5. Theory of Operation
There are several steps:
- Decide on data fields available for edition/listing/sorting/search and prepare two configuration structures: list of data (or synthetic) fields and general scaffolding options (like custom view folder, pagination etc.)
- Initialize scaffolding by passing 3 parameters: data providing class instance and the two configuration structures.
6. Milestones / Tasks
Component has a stable release on Github.
7. Class Index
- Zend_Controller_Scaffolding
8. Use Cases
9. Class Skeletons
| View scripts View scripts for corresponding actions will be available. User will have to place them under /views/scripts/scaffolding. |
9 Comments
comments.show.hideAug 21, 2010
Georgy Turevich
<p>Do you have open repository (Google code, Github ...) with work prototype?</p>
Aug 27, 2010
Alex
<p><strong>edited</strong><br />
Yes (see the references)</p>
Sep 04, 2010
porter
<p>Fix UC-4 "// Controller setup" section: what to do with array $fields?</p>
Sep 08, 2010
Alex
<p>just skipped details already described in UC-1. anyway updated the doc to make it more clear</p>
Sep 07, 2010
porter
<p>Request for 2 things:<br />
1. Add second submit button in update view which will save data and not change view. For example, it is useful when editor edit big article.<br />
2. Add opportunity for some optional including of partial view. For example, for adding javascript check to specified fields. It can be done with optional options in the last parameter of initScaffolding.</p>
Sep 08, 2010
Alex
<p>1. Yes, that's a good idea. We can even have three buttons there:</p>
<table><tbody>
<tr>
<th><p>Save</p></th>
<th><p>Save and continue</p></th>
<th><p>Save and create new</p></th>
</tr>
</tbody></table>
<p>2. If you want a Javascript to be included why not include it with </p>
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
$this->view->headScript()
>appendFile($this>view->baseUrl('/js/some-script.js'));]]></ac:plain-text-body></ac:macro>
<p>by placing it in the desired action and calling the default scaffolding action:</p>
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
public function indexAction() {
$this->view->headScript()
>appendFile($this>view->baseUrl('/js/some-script.js'));parent::indexAction();
}
]]></ac:plain-text-body></ac:macro>
<p>Do not forget we extend the scaffolding class, and many things become possible. </p>
Sep 08, 2010
Alex
<p>New buttons added</p>
Jun 22, 2011
Kuba
<p>Small fix:</p>
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
$options = array(
// (...)
// disable deletion action
// 'disabled_actions' => array(self::ACTION_DELETE)
)
]]></ac:plain-text-body></ac:macro>
<p>Should be</p>
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
$options = array(
// (...)
// disable deletion action
// 'disabledActions' => array(self::ACTION_DELETE)
);
]]></ac:plain-text-body></ac:macro>
<p>If you want to disable actions.</p>
Feb 02, 2012
Andreu Vallbona
<p>Hi Alex,</p>
<p>first of all, congratulations for such a great work. </p>
<p>I would like to know if the scaffolding component you developed has image/file support in the forms update/create ? </p>
<p>Thanks !!</p>