webmak10
webmak10

Reputation: 519

How to make <code> work in ApiGen

Tying to generate auto doc using ApiGen. Have add followed comment for doc generation. I was hope that block in "code" will make same appearance as in short's description, but it does not work. I'm not sure how to make the same. Are there some method?enter image description here

/**
 * Short desc
 * 
 * @param array $tabs
 * 
 * For example
 * <code>
 * $admin_tabs = array(
 *           'AdminDeliveryManager' => array('name' => 'Delivery manager', 'id_parent' => 0),
 *           'AdminRole' => array('name' => 'Admin role', 'id_parent' => -1),
 *           'AdminEmployeeRole' => array('name' => 'Admin role', 'id_parent' => -1)
 *       );
 * </code>
 * 
 * @return boolean true if all tabs created / false if have some error
 */

Upvotes: 0

Views: 140

Answers (1)

Splitlocked
Splitlocked

Reputation: 791

ApiGen wants plain description to go first and then all the tag lines after.

Examples of how to use the function should go in an @example tag like so:

/**
 * Short desc
 *
 * @param  array   $tabs
 * @return boolean       true if all tabs created / false if have some error
 * @example
 * <code>
 * $admin_tabs = array(
 *           'AdminDeliveryManager' => array('name' => 'Delivery manager', 'id_parent' => 0),
 *           'AdminRole' => array('name' => 'Admin role', 'id_parent' => -1),
 *           'AdminEmployeeRole' => array('name' => 'Admin role', 'id_parent' => -1)
 *       );
 * createTabs($admin_tabs);
 * </code>
 */

How it renders for me

Upvotes: 1

Related Questions