You are here: User Guide > Tasks > Working with Plugins > Creating and Editing Code Gallery Entries

Creating and Editing Code Gallery Entries

Prerequisites

For more information on installing plugins in Zend Studio, see Customizing Zend Studio Using the Welcome Page.

Adding a Code Snippet to Your List

This procedure describes how to create a new code snippet and add it to your User Code Gallery so that you can quickly and easily insert it into your script.

 

 

Instructions on how to complete a procedure

To add a code snippet to your list:

  1. Open the Code Gallery View by going to Window | Show View | Other | PHP Tools | Code Gallery.

  2. Right-click the 'User Code Gallery' from the list and select New Entry -or- click the New Entry icon on the Code Gallery view's toolbar.
    A New code gallery entry dialog will open.

New Code Gallery Entry

  1. Enter the code snippet's name, author and description in the relevant fields.

  2. In the 'Code' box, enter the code snippet.

  3. Click OK.

Your new code snippet will be added to the list.

Code Gallery view

Editing an Existing Snippet

 

 

Instructions on how to complete a procedure

To edit an existing snippet:

  1. Open the Code Gallery View by going to Window | Show View | Other | PHP Tools | Code Gallery.

  2. Expand the nodes next to the required User Code Gallery in the Code Gallery view -or- enter a string into the 'type filter text box' to search for the particular category or snippet.

  3. Select the required code snippet.
    The details of the code snippet, including its description and a preview of the code, will appear in the right-hand pane.

  4. Right-click the snippet and select Edit.

  5. The New code gallery entry dialog will open containing the snippet's details.

Code Gallery Edit

  1. Make the required edits and click OK.

The code snippet will be updated with the edits you have made.

Note:

You can only edit snippets in the User Code Gallery.

 

 

Related Links:

Using Code Galleries
Code Galleries

Inserting Code Snippets into your Script

Interacting with Code Gallery Sites

 

 

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