===== Documentation Construction Notes =====
The goal of the immediate effort is to rewrite the API ActionView documentation for this Wiki. Two of the goals in doing so will be
* To convert the documentation so that it will be read, not from the Akelos developer's viewpoint, but from the Akelos user's viewpoint.
* To organize it so that the developer who is trying to firgure out how to do something may do so easily.
Other goals will be to merge in converted articles from the RoR Wiki that apply to Views.
In this document, we have listed the directory structure of this part of the Wiki. We will put references to the API into this structure. We will color-code them to show what progress has been made:
* A pink background indicates work that has not been started.
* A yellow background indicates work in progress.
* A green background indicates completed work.\\ These items can still be improved.
This Wiki page is to be removed when everything is completed.
==== Templates ====
[[Templates|Templates]]\\
Base | AkActionView:\\
Base | AkActionView | Method Detail\\
* static void _addGlobalVar ( $var_name, $value, [ $_retrieve = false])\\
* static void _getGlobals ()\\
* AkActionView AkActionView ([ $base_path = null], [ $assigns_for_first_render = array()], [ $controller = null])\\
* void addSharedAttributes ( &$local_assigns)\\
* void delegateTemplateExists ( $template_path)\\
* void evaluateAssigns ()\\
* void fileIsPublic ( $template_path)\\
* void getFullTemplatePath ( $template_path, $extension)\\
* void pickTemplateExtension ( $template_path)\\
* void render ([ $options = array()])\\
* void renderCollectionOfPartials ( $partial_name, $collection, [ $partial_spacer_template = null], [ $local_assigns = array()])\\
* void renderFile ( $template_path, [ $use_full_path = true], [ $local_assigns = array()])\\
* void renderPartial ( $partial_path, $object, [ $local_assigns = array()])\\
* void renderPartialCollection ( $partial_name, $collection, [ $partial_spacer_template = null], [ $local_assigns = array()])\\
* void renderTemplate ( $____template_extension, $____template, [ $____file_path = null], [ $____local_assigns = array()], [ $____save_content_in_attribute_as = 'layout'])\\
* void _addObjectToLocalAssigns ( $partial_name, $local_assigns, &$object)\\
* void _addObjectToLocalAssigns_ ( $partial_name, &$local_assigns, $object)\\
* void _assignVariablesFromController ()\\
* void _delegateRender ( $handler, $template, $local_assigns, $file_path)\\
* void &_extractingObject ( $partial_name, &$deprecated_local_assigns)\\
* void _javascriptTemplateExists ( $template_path)\\
* void _loadHelpers ([ $helper_dir = null])\\
* void _partialCounterName ( $partial_name)\\
* void _partialPathName ( $partial_path)\\
* void _partialPathPiece ( $partial_path)\\
* void _readTemplateFile ( $template_path)\\
* void _registerTemplateHandler ( $extension, $className)\\
* void _templateExists ( $template_path, $extension)\\
==== Helpers ====
Link to [[Helpers]] that have been documented.\\
=== ActionViewHelper ===
Helpers | AkActionViewHelper This class is probably not of use to users of Akelos. Other classes are extended from this one.\\
* AkActionViewHelper AkActionViewHelper ()
* void addObject ( $object_name, &$object)
* void &getObject ( $object_name)
* void setController ( &$controller)
* void t ( $string, [ $array = null], [ $name_space = null])
=== ActiveRecordHelper ===
Helpers | ActiveRecordHelper The Active Record Helper makes it easier to create forms for records kept in instance variables. The most far-reaching is the form method that creates a complete form for all the basic content types of the record (not associations or aggregations, though). This is a great of making the record quickly available for editing, but likely to prove lackluster for a complicated real-world form.\\
* void all_input_tags ( &$record, $record_name, [ $options = array()])
* void default_input_block ()
* void error_messages_for ( $object_name, [ $options = array()])
* void error_message_on ( $object_name, $method, [ $prepend_text = ''], [ $append_text = ''], [ $css_class = 'formError'])
* void form ( $record_name, [ $options = array()])
* void input ( $record_name, $method, [ $options = array()])
=== AssetTagHelper ===
Helpers | AssetTagHelper Provides methods for linking an HTML page together with other assets, such as javascripts, stylesheets, and feeds.\\
* void auto_discovery_link_tag ([ $type = 'rss'], [ $url_options = array()], [ $tag_options = array()])
* void image_path ( $source)
* void image_tag ( $source, [ $options = array()])
* void javascript_for_current_controller ()
* void javascript_include_tag ()
* void javascript_path ( $source)
* void register_javascript_include_default ( $sources)
* void reset_javascript_include_default ()
* void setController ( &$controller)
* void stylesheet_for_current_controller ()
* void stylesheet_link_tag ()
* void stylesheet_path ( $source)
* void _compute_public_path ( $source, [ $dir = ''], [ $ext = ''])
* void _get_javascript_included_defaults ()
=== CaptureHelper ===
Helpers | CaptureHelper Capture lets you extract parts of code into instance variables which can be used in other points of the template or even layout file.\\
* void begin ([ $var_name = ''])
* void content_for ( $name)
* void end ([ $add_to_view = true])
* void _addVarToView ( $var_name, $content)
=== FormHelperBuilder ===
Helpers | AkFormHelperBuilder\\
This is documented at [[http://wiki.akelos.org/forms|Forms]]
=== FormTagHelper ===
Helpers | FormTagHelper Provides a number of methods for creating form tags that don't rely on conventions with an object assigned to the template like FormHelper does. With the FormTagHelper, you provide the names and values yourself.\\
=== JavaScriptHelper ===
Helpers | JavaScriptHelper \\
* void button_to_function ( $name, $function, [ $html_options = array()])
* void define_javascript_functions ()
* void escape_javascript ( $javascript)
* void javascript_cdata_section ( $content)
* void javascript_tag ( $content)
* void link_to_function ( $name, $function, [ $html_options = array()])
* void _array_or_string_for_javascript ( $option)
* void _options_for_javascript ( $options)
=== JavaScriptMacrosHelper ===
Helpers | JavaScriptMacrosHelper \\
Deprecated.\\
=== Menu Helper ===
Helpers | MenuHelper The Menu Helper makes it easier to create simple menus from controllers actions.\\
* void menu_for_controllers ([ $menu_options = array()], [ $div_menu_id = 'menu'], [ $current_class = 'current'], [ $title_tag = 'h2'])
* void _get_default_full_menu ()
* void _get_this_class_methods ( $class)
=== NumberHelper ===
Helpers | NumberHelper Provides methods for converting a number into a formatted string that currently represents one of the following forms: phone number, percentage, money, or precision level.\\
* void human_size ( $size)
* void human_size_to_bytes ( $size)
* void number_to_currency ( $number, [ $options = array()])
* void number_to_human_size ( $size, [ $decimal = 1])
* void number_to_percentage ( $number, [ $options = array()])
* void number_to_phone ( $number, [ $options = array()])
* void number_with_delimiter ( $number, [ $delimiter = ','])
* void number_with_precision ( $number, [ $precision = 3])
* void zeropad ( $number, $length)
=== Pagination Helper ===
Helpers | PaginationHelper\\
* void getFindOptions ( &$object)
* void getPaginator ( &$object, [ $options = array()])
* void getSortDirection ()
* void sortable_link ( $column, [ $url_options = array()], [ $link_options = array()])
* void _getOrderColumnFromCurrentModel ( &$object, $paginator_name)
* void _getOrderFromAssociations ( &$object, $paginator_name, &$find_options)
* void _getOrderFromCustomDictionary ( $paginator_name, &$find_options)
=== PrototypeHelper ===
Helpers | PrototypeHelper Provides a set of helpers for calling Prototype JavaScript functions, including functionality to call remote methods using Ajax.\\
* void evaluate_remote_response ()
* void form_remote_for ( $object_name, $object, [ $options = array()], $proc)
* void form_remote_tag ([ $options = array()])
* void getAjaxOptions ()
* void getCallbacks ()
* void link_to_remote ( $name, [ $options = array()], [ $html_options = array()])
* void observe_field ( $field_id, [ $options = array()])
* void observe_form ( $form_id, [ $options = array()])
* void periodically_call_remote ([ $options = array()])
* void remote_form_for ( $object_name, $object, [ $options = array()], $proc)
* void remote_function ([ $options = array()])
* void submit_to_remote ( $name, $value, [ $options = array()])
* void update_element_function ( $element_id, [ $options = array()])
* void _buildCallbacks ( $options)
* void _buildObserver ( $class, $name, [ $options = array()])
* void _methodOptionToString ( $method)
* void _optionsForAjax ( $options)
=== ScriptaculousHelper ===
Helpers | ScriptaculousHelper Provides a set of helpers for calling Scriptaculous JavaScript functions, including those which create Ajax controls and visual effects.\\
* void draggable_element ( $element_id, [ $options = array()])
* void draggable_element_js ( $element_id, [ $options = array()])
* void drop_receiving_element ( $element_id, [ $options = array()])
* void sortable_element ( $element_id, [ $options = array()])
* void visual_effect ( $name, [ $element_id = false], [ $js_options = array()])
=== TagHelper ===
Helpers | TagHelper Use these methods to generate HTML tags programmatically when you can't use a Builder.\\
* void cdata_section ( $content)
* void content_tag ( $name, $content, [ $options = null])
* void escape_once ( $html)
* void tag ( $name, [ $options = null], [ $open = false])
* void _fix_double_escape ( $escaped)
* void _tag_options ( $options)
=== TextHelper ===
Helpers | TextHelper\\
This has a broken link (404)\\
=== UrlHelper ===
Helpers | UrlHelper\\
This has a broken link (404)\\
==== Forms ====
[[Forms]]\\
Helpers | FormHelper\\
Helpers | AkFormHelperOptionsInstanceTag\\
Use these methods to generate HTML tags programmatically.\\
* [[select-AkFormHelperOptionsInstanceTag|AkFormHelperOptionsInstanceTag]] ( $object_name, $column_name, &$template_object, [ $local_binding = null], &$object)\\
* [[select-to_collection_select_tag|to_collection_select_tag]] ( $collection, $value_column_name, [ $text_column_name = null], [ $options = array()], [ $html_options = array()])\\
* [[select-to_country_select_tag|to_country_select_tag]] ([ $priority_countries = array()], [ $options = array()], [ $html_options = array()])\\
* [[select-to_select_tag|to_select_tag]] ( $choices, [ $options = array()], [ $html_options = array()])\\
* [[select-to_time_zone_select_tag|to_time_zone_select_tag]] ([ $priority_zones = array()], [ $options = array()], [ $html_options = array()])\\
* [[select-addOptions|_addOptions]] ( $option_tags, $options, [ $value = null])\\
Helpers | DateHelper\\
Helpers | AkFormOptionsHelper\\
=== Sintags ===
== Sintags ==
AkSintags | AkSintags\\
* void init ([ $options = array()])
* void toPhp ()
== SintagsLexer ==
AkSintags | AkSintagsLexer\\
* AkSintagsLexer AkSintagsLexer ( &$parser)
* void _addBlockTokens ()
* void _addCommentTokens ()
* void _addConditionalVariableTokens ()
* void _addConditionStartTokens ()
* void _addElseTagTokens ()
* void _addEndTagTokens ()
* void _addEscapedTextTokens ()
* void _addHelperTokens ()
* void _addInlineHelperTokens ()
* void _addLoopAsTokens ()
* void _addLoopTokens ()
* void _addPhpTokens ()
* void _addSintagsHelperParametersForScope ([ $scope = 'Helper'])
* void _addTranslationTokens ()
* void _addVariableTokens ()
* void _addVariableTranslationTokens ()
* void _addXmlTokens ()
== SintagsParser ==
AkSintags | AkSintagsParser\\
AkSintagsParser AkSintagsParser ([ $mode = 'Text'])
* void afterParsing ( $parsed)
* void beforeParsing ( $raw)
* void Block ( $match, $state)
* void ConditionalVariable ( $match, $state)
* void ConditionStart ( $match, $state)
* void DoubleQuote ( $match, $state)
* void ElseTag ( $match, $state)
* void EndTag ( $match, $state)
* void EscapedText ( $match, $state)
* void getResults ()
* void Hash ( $match, $state)
* void Helper ( $match, $state, [ $position = null], [ $is_inline_function = false])
* void HelperFunction ( $match, $state, [ $position = null])
* void HelperVariable ( $match, $state, [ $position = null], [ $inline = false])
* void ignore ( $match, $state)
* void InlineHelper ( $match, $state, [ $position = null])
* void InlineVariable ( $match, $state, [ $position = null])
* void Loop ( $match, $state)
* void Numbers ( $match, $state)
* void parse ( $raw)
* void PhpCode ( $match, $state)
* void raiseError ( $error, [ $type = E_USER_NOTICE])
* void SingleQuote ( $match, $state)
* void Struct ( $match, $state)
* void Symbol ( $match, $state)
* void Text ( $text)
* void Translation ( $match, $state)
* void TranslationToken ( $match)
* void Variable ( $match, $state)
* void VariableTranslation ( $match, $state)
* void XmlOpening ( $match, $state)
* void _convertSintagsVarToPhp ( $var)
* void _escapeChars ( $string)
* void _getAvailableHelpers ()
* void _getHelperNameForMethod ( &$method_name)
* void _getTerminationName ( $plural)
* void _handleQuotedParam ( $match, $state, $quote_using)
* void _tokenizeHelperStructures ( $raw_structures)
* void _unescapeChars ( $string, [ $strip_slashes_from_tokens = false])
==== Template Engines ====
=== PHP Code Sanitizer ===
TemplateEngines | AkPhpCodeSanitizer\\
* void AnalyzeCode ( $code)
* void clearErrors ()
* void &getCodeAnalyzerInstance ()
* void getErrors ()
* void getForbiddenFunctions ()
* void getForbiddenMethods ()
* void isCodeSecure ([ $code = null], [ $raise_if_insecure = true])
* void isPrivateDynamicVar ( $var)
* void isPrivateVar ( $var)
* void lookForPrivateMemberVariables ( $var, [ $nested = false])
* void raiseError ([ $code = null])
* void secureClasses ([ $code = null])
* void secureConstructs ([ $code = null])
* void secureFunctions ([ $code = null])
* void secureProtectedTypes ()
* void secureVariables ( $code)
* void setOptions ( $options)
* void _addDollarSymbol_ ( &$var)
* void _getFuntionsAsVariables ( $functions_array)
=== PHP Template Handler ===
TemplateEngines | AkPhpTemplateHandler\\
* AkPhpTemplateHandler AkPhpTemplateHandler ( &$AkActionView)
* void render ( &$____code, $____local_assigns, $____file_path)
* void _assertForValidTemplate ()
* void _getCompiledTemplateBasePath ()
* void _getCompiledTemplatePath ()
* void _getTemplateBasePath ()
* void _getTemplateFilename ()
* void _getTemplatePath ()
* void _saveCompiledTemplate ()
* void _templateNeedsCompilation ()
* void _templateNeedsValidation ()
==== Utils ====
=== XHTML Validator ===
TemplateEngines | AkPhpTemplateHandler\\
* AkXhtmlValidator AkXhtmlValidator ()
* void addError ( $error, [ $highlight_text = array()])
* void cdata ( $parser, $cdata)
* void convertLiteralEntitiesToNumericalEntities ( $xhtml)
* void doesAttributeNeedsValidation ( $tag, $attribute)
* void getAvailableTags ()
* void getCompulsoryTagAttributes ( $tag)
* void getCurrentLine ()
* void getDefaultAttributesAndEventsForTag ( $tag)
* void getDefaultAttributesAndEventsForTags ()
* void getErrors ()
* void getInverseRulesForTag ( $tag)
* void getPossibleTagAttributes ( $tag)
* void getRules ()
* void getUniqueAttributesAndEventsForTag ( $tag)
* void hasErrors ( &$xhtml)
* void highlightError ( $error, [ $highlight_text = array()])
* void highlightErrors ( $xhtml)
* void isTagAlowedOnCurrentContext ( $tag, $previous)
* void protectFromDuplicatedIds ( $tag, $attributes)
* void removeCdata ( $xhtml)
* void removeDoctypeHeader ( $xhtml)
* void showErrors ()
* void tagClose ( $parser, $tag)
* void tagOpen ( $parser, $tag, $attributes)
* void validate ( &$xhtml)
* void validateAttribute ( $tag, $attribute, [ $value = null])
* void validateRequiredAttributes ( $tag, $attributes)
* void validateTagAttributes ( $tag, [ $attributes = array()])
* void validateUniquenessOfIds ()
==== Form Builders ====
Helpers | AkFormHelperBuilder Other classes are extended from this one.\\
Helpers | AkFormOptionsHelperBuilder
==== Non-model Fields ====
[[Nonmodel Fields]]\\
Helpers | AkFormHelperInstanceTag Use these methods to generate HTML tags programmatically when you can't use a Builder.\\
Helpers | ActiveRecordInstanceTag These methods are used to generate HTML tags programmatically when you can't use a Builder.\\
* AkFormHelperInstanceTag AkFormHelperInstanceTag ( $object_name, $column_name, &$template_object, [ $local_binding = null], [ $object = null])
* void add_default_name_and_id ( &$options)
* void &getObject ([ $object_name = null])
* void getValue ()
* void tag_id ()
* void tag_id_with_index ( $index)
* void tag_name ()
* void tag_name_with_index ( $index)
* void to_boolean_select_tag ([ $options = array()])
* void to_check_box_tag ([ $options = array()], [ $checked_value = '1'], [ $unchecked_value = '0'])
* void to_content_tag ( $tag_name, [ $options = array()])
* void to_datetime_select_tag ([ $options = array()])
* void to_date_select_tag ([ $options = array()])
* void to_date_tag ()
* void to_input_field_tag ( $field_type, [ $options = array()])
* void to_radio_button_tag ( $tag_value, [ $options = array()])
* void to_text_area_tag ([ $options = array()])
* void value_before_type_cast ()
==== Uploading Files ====
Helpers | FileUploadHelper\\