You are here: User Guide > Tasks > Developing with Zend Framework > Creating a Zend Action Helper

Creating a Zend Action Helper

Zend Action Helpers provide an easy way of extending the capabilities of Action Controllers, allowing you to extend Action Controller functionality only when it is needed. Zend Studio allows you to easily create and use Action Helpers within your Zend Framework projects.

For more information on Action Helpers, see http://devzone.zend.com/article/3350-Action-Helpers-in-Zend-Framework.

 

 

Instructions on how to complete a procedure

To create a new Zend Action Helper file:

  1. In PHP Explorer view, right-click the relevant helpers folder in your Zend Framework Project and select New | Zend Framework Item | Zend Action Helper.

  2. The New Zend Action Helper Wizard will be displayed.

  1. The default location for the file will be in the application's default 'helper' folder.
    Click Browse next to the Source Folder field to change the location.

  2. Enter the Helper's name. This will be the name of the Helper file.
    The Helper's class name will be automatically created in the format <Helper's_Prefix>_<Helper's_Name>.

  3. Click Next.
    The Select PHP Template dialog is displayed.

  1. Select the New Zend View Action template, and click Finish.

 

 

Note:

Zend Action Helper phpDoc block comments must be in the format:

/**

* <Helper's_Name> Action Helper
*
* @uses actionHelper <Helper's_Prefix>
*/

All Zend Action Helpers in your project which are correctly commented will be available in the Code Assist list in Zend Controller files. This includes both the default Zend Action Helpers included in Zend Framework's libraries and the Actions Helpers you created.

The Helper broker for the Helper's members and methods are also available for Content Assist:

In addition, pressing Ctrl and clicking on a Zend Action Helper in a Controller file will take you to the Zend Controller Action Helper's declaration.

 

 

Related Links:
Zend Framework Integration

Integrating with Zend Framework

Creating Zend Framework Elements

Creating Zend Framework Projects

Creating a Zend Controller File

Creating a Zend Controller Test Case

©1999-2012 Zend Technologies LTD. All rights reserved.