View Source

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template}

h1. Zend Framework: Zend_View_Helper_Bbcode Component Proposal

||Proposed Component Name|Zend_View_Helper_Bbcode|
||Developer Notes|[http://framework.zend.com/wiki/display/ZFPROP/Zend_View_Helper_Bbcode+-+Kirill+Vlasov]|
||Proposers|[Kirill Vlasov|mailto:vlasov.kirill@gmail.com]|
||Zend Liaison||
||Revision|1.0 - 11 June 2011. (wiki revision: {page-version})|

h1. Table of Contents

{toc-zone:location=top|type=list|style=none|indent=0px|printable=true}

{anchor:overview}
h2. 1. Overview
Zend_View_Helper_Bbcode is helper for proccessing string with some elements of bbcode.

{anchor:references}
h2. 2. References
* [Zend_Markup|http://framework.zend.com/manual/en/zend.markup.html]
* [Zend_View|http://framework.zend.com/manual/en/zend.view.html]

{anchor:requirements}
h2. 3. Component Requirements, Constraints, and Acceptance Criteria
Currently we have got standard helper of view

* The components will extend abstract class of helper

{anchor:dependencies}
h2. 4. Dependencies on Other Framework Components
* Zend/Markup

{anchor:theory}
h2. 5. Theory of Operation
The primary goal of this component is simplest. Just proccessing string with bbcode in script of view.

{anchor:milestones}
h2. 6. Milestones / Tasks
* Maybe create some setting

{anchor:classes}
h2. 7. Class Index
* Zend/View/Helper/Bbcode

{anchor:usecases}
h2. 8. Use Cases
||UC-01||
{code}
<?php echo $this->bbcode($this->text) ?>
{code}

{anchor:skeletons}
h2. 9. Class Skeletons
{code}

require_once 'Zend/Markup.php';

class Zend_View_Helper_Bbcode extends Zend_View_Helper_Abstract
{
public function bbcode($string)
{
$bbcode = Zend_Markup::factory('Bbcode');
$string = $bbcode->render($string);

return $string;
}
}
{code}

{toc-zone}

{zone-template}]]></ac:plain-text-body></ac:macro>