- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::Page
::xowiki::Page create ... \
[ -absolute_links (default "0") ] \
[ -do_substitutions (default "1") ] \
[ -render_adp (default "1") ]
Defined in
Class Relations
- class: ::xo::db::CrClass
- superclass: ::xo::db::CrItem
- subclass: ::xowiki::File, ::xowiki::PageTemplate, ::xowiki::PageInstance, ::xowiki::PlainPage
Methods (to be applied on the object)
find_slot (scripted)
xowiki::Page find_slot
- Testcases:
- slot_interactions, xowiki
Methods (to be applied on instances)
anchor (scripted)
<instance of xowiki::Page> anchor
- Testcases:
- nested_self_references, xowiki
create_form_fields_from_form_constraints (scripted, public)
<instance of xowiki::Page> create_form_fields_from_form_constraints \ [ -lookup ] form_constraintsCreate form-fields from form constraints. When "-lookup" is specified, the code reuses existing form-field instead of recreating it. Since create_raw_form_field uses destroy_on_cleanup, we do not have to care here about destroying the objects.
- Switches:
- -lookup (optional)
- Parameters:
- form_constraints (required)
- Returns:
- potentially empty list of form-field objects
- Testcases:
- form_fields_from_form_constraints
create_link (scripted)
<instance of xowiki::Page> create_link
- Testcases:
- path_resolve, xowiki, nested_self_references
find_slot (scripted)
<instance of xowiki::Page> find_slot
- Testcases:
- slot_interactions, xowiki
get_form_data (scripted, public)
<instance of xowiki::Page> get_form_data \ [ -field_names field_names ] form_fieldsGet the values from the form and store it in the form fields and finally as instance attributes. If the field names are not specified, all form parameters are used.
- Switches:
- -field_names (optional)
- Parameters:
- form_fields (required)
- Testcases:
- create_form_with_form_instance
include (scripted, public)
<instance of xowiki::Page> include [ -configure configure ] argInclude the html of the includelet. The method generates an includelet object (might be another xowiki page) and renders it and returns either html or an error message.
- Switches:
- -configure (optional)
- Parameters:
- arg (required)
- Testcases:
- includelet_toc, includelet_childresources, create_form_with_form_instance
is_folder_page (scripted, public)
<instance of xowiki::Page> is_folder_page \ [ -include_folder_links include_folder_links ]Check, if page is a folder. This function is typically overlaaded by specializations. Plain xowiki::Pages are never folders.
- Switches:
- -include_folder_links (optional, defaults to
"true"
)- return true, if the current page is a link to a folder.
- Returns:
- boolean
- Testcases:
- xowiki_test_cases
pretty_link (scripted, public)
<instance of xowiki::Page> pretty_link [ -anchor anchor ] \ [ -query query ] [ -absolute on|off ] [ -siteurl siteurl ] \ [ -lang lang ] [ -download download ] [ -path_encode on|off ]This method is a convenience stub for Package->pretty_link and can be overloaded for different pages types. Note that it is necessary to initialize the package before this method can be used.
- Switches:
- -anchor (optional)
- anchor to be added to the link
- -query (optional)
- query parameters to be added literally to the resulting URL
- -absolute (optional, boolean, defaults to
"false"
)- make an absolute link (including protocol and host)
- -siteurl (optional)
- -lang (optional)
- use the specified 2 character language code (rather than computing the value)
- -download (optional, defaults to
"false"
)- create download link (without m=download)
- -path_encode (optional, boolean, defaults to
"true"
)- control encoding of the url path. Returns the URL path urlencoded, unless path_encode is set to false.
- Returns:
- the pretty_link for the current page
- See Also:
- Testcases:
- xowiki_test_cases, nested_self_references
render (scripted, public)
<instance of xowiki::Page> render \ [ -update_references update_references ] [ -with_footer on|off ]Render a wiki page with some optional features, such as including a footer or updating references for this page.
- Switches:
- -update_references (optional, defaults to
"unresolved"
)- might be "all", "unresolved" or "never"
- -with_footer (optional, boolean, defaults to
"true"
)- boolean value
- Returns:
- rendered HTML content.
- Testcases:
- xowiki_test_cases, link_tests
resolve_included_page_name (scripted, public)
<instance of xowiki::Page> resolve_included_page_name page_nameDetermine the page object for the specified page name. The specified page name might have the form //some_other_instance/page_name, in which case the page is resolved from some other package instance. If the page_name does not contain a language prefix, the language prefix of the including page is used.
- Parameters:
- page_name (required)
- Testcases:
- No testcase defined.
save_new (scripted)
<instance of xowiki::Page> save_new
- Testcases:
- nested_self_references, xowiki
substitute_markup (scripted)
<instance of xowiki::Page> substitute_markup
- Testcases:
- nested_self_references, xowiki
www-autosave-attribute (scripted, public)
<instance of xowiki::Page> www-autosave-attributeThe web-callable method which is a simplified version of save-attributes, but which does NOT perform input validation, which might be a problem in case of partial input.
- Testcases:
- No testcase defined.
www-bulk-delete (scripted, public)
<instance of xowiki::Page> www-bulk-deleteThis web-callable method performs a bulk delete based on the object names provided by the form-variable "objects" and refresh then the caller page. This method is e.g. called by the folder-procs. By passing the "instantiate_p" one can decide whether each item should be instantiated (useful when the delete logic from the whole item ancestry is required), or if we will rely on the cheaper deletion at the package level. The default is false.
- Testcases:
- No testcase defined.
www-clipboard-add (scripted, public)
<instance of xowiki::Page> www-clipboard-addThis web-callable method adds elements to the clipboard based on the names provided by the form variable "objects". The objects are resolved below the current object, which is treated as containing folder. After adding elements to the clipboard, redirect either to the return_url of the calling page.
- Testcases:
- No testcase defined.
www-clipboard-clear (scripted, public)
<instance of xowiki::Page> www-clipboard-clearThis web-callable method clears the clibpboard contents. Finally redirect either to the return_url of the calling page.
- Testcases:
- No testcase defined.
www-clipboard-content (scripted, public)
<instance of xowiki::Page> www-clipboard-contentThis web-callable method displays the content of the clipboard. Finally redirect either to the return_url of the calling page.
- Testcases:
- No testcase defined.
www-clipboard-copy (scripted, public)
<instance of xowiki::Page> www-clipboard-copyThis web-callable method copies the content of the clipboard to the current folder. After copying the elements from the clipboard, redirect either to the return_url of the calling page.
- Testcases:
- No testcase defined.
www-clipboard-export (scripted, public)
<instance of xowiki::Page> www-clipboard-exportThis web-callable method exports the content of the clipboard in form of an xowiki dump. Then clear the clipboard and stop the script.
- Testcases:
- No testcase defined.
www-create-new (scripted, public)
<instance of xowiki::Page> www-create-new \ [ -parent_id parent_id ] [ -view_method view_method ] \ [ -name name ] [ -nls_language nls_language ] \ [ -publish_status publish_status ]This web-callable method creates a new page, typically an instance of a form page. The method accesses several form variables such as "__form_redirect", "__text_to_html", "last_page_id", "name", "nls_language", "package_id", "package_instance", "page_order", "parent_id", "publish_status", "source_item_id", "title" The call redirects either to the "__form_redirect" or to the created page.
- Switches:
- -parent_id (optional, defaults to
"0"
)- -view_method (optional, defaults to
"edit"
)- -name (optional)
- -nls_language (optional)
- -publish_status (optional)
- Testcases:
- create_test_items, create_composite_test_item, xowiki_test_cases, create_form_with_form_instance, create_form_with_numeric, form_validate, create_folder_and_configure
www-create-or-use (scripted, public)
<instance of xowiki::Page> www-create-or-use \ [ -parent_id parent_id ] [ -view_method view_method ] \ [ -name name ] [ -nls_language nls_language ]This web-callable method calls www-create-new, unless overloaded from some other package, as done e.g. by xowf.
- Switches:
- -parent_id (optional, defaults to
"0"
)- -view_method (optional, defaults to
"edit"
)- -name (optional)
- -nls_language (optional)
- Testcases:
- create_test_items
www-csv-dump (scripted, public)
<instance of xowiki::Page> www-csv-dumpThis web-callable method produces a CSV dump based on the includelet "form-usages".
- Testcases:
- No testcase defined.
www-delete (scripted, public)
<instance of xowiki::Page> www-delete [ -return_url return_url ]This web-callable method deletes a page via the delete method of the package.
- Switches:
- -return_url (optional)
- Testcases:
- xowiki_test_cases
www-delete-revision (scripted, public)
<instance of xowiki::Page> www-delete-revisionThis web-callable method deletes a single revision of a Page, which is actually performed by the "delete_revision" method of the package, which is responsible for caching. Since we instantiate the Page based on the "revision_id" query parameter, it is sufficient to delete here just based on the current instance variable of the revision_id.
- Testcases:
- No testcase defined.
www-diff (scripted, public)
<instance of xowiki::Page> www-diffThis web-callable method produces a "diff" of two pages based on the current page and the revision_id provided as query parameter by "compare_revision_id". We can choose here between the more fancy "::util::html_diff" and a plain text diff. The latter is used, when the query variable "plain_text_diff" is provided, or when the fancy diff raises an exception.
- Testcases:
- No testcase defined.
www-duplicate (scripted, public)
<instance of xowiki::Page> www-duplicateThis web-callable method duplicated the current object. It uses the same mechanisms as the clipboard-copy operation. After adding elements to the clipboard, redirect either to the return_url of the calling page (as handled by www-clipboard-copy)
- Testcases:
- No testcase defined.
www-edit (scripted, public)
<instance of xowiki::Page> www-edit [ -new on|off ] \ [ -autoname on|off ] [ -validation_errors validation_errors ]This web-callable method renders a page in "edit" mode (i.e. provide input fields). This is the old-style edit based on the old-style xowiki-form-procs. FormPages should be used when possible for better user experience.
- Switches:
- -new (optional, boolean, defaults to
"false"
)- is this an edit-new operation?
- -autoname (optional, boolean, defaults to
"false"
)- value to be passed to getFormClass
- -validation_errors (optional)
- ignored in this class, but used for compatibility with FormPage.www-edit
- Testcases:
- xowiki_test_cases, create_form_with_form_instance, create_form_with_numeric, form_validate
www-list (scripted, public)
<instance of xowiki::Page> www-listThis web-callable method provides a listing of pages. When the query parameter "children" is used, it returns the children of this item via the "child-resources" includelet. Otherwise, when this method is called on any kind of Form, it returns the form instances via the "form-usages" includelet. Otherwise, when this method is called on any kind of folder pages, it returns the elements of this folder via the "child-resources" includelet. If the above fails, it redirects to the starting page.
- Testcases:
- No testcase defined.
www-make-live-revision (scripted, public)
<instance of xowiki::Page> www-make-live-revisionThis web-callable method makes the revision specified by parameter "revision_id" the live revision, or when this is not available, the parameter "local_return_url".
- Testcases:
- No testcase defined.
www-popular-tags (scripted, public)
<instance of xowiki::Page> www-popular-tagsAJAX called function, returns an HTML snippet with the popular tags.
- Testcases:
- No testcase defined.
www-revisions (scripted, public)
<instance of xowiki::Page> www-revisionsThis web-callable method lists the revisions based. The rendering is actually performed in the cr-procs, but can overloaded per package.
- Testcases:
- xowiki_test_cases
www-save-attributes (scripted, public)
<instance of xowiki::Page> www-save-attributesThe web-callable method save-attributes is typically callable over the REST interface. It allows one to save attributes of a page without adding a new revision.
- Testcases:
- No testcase defined.
www-save-tags (scripted, public)
<instance of xowiki::Page> www-save-tagsThis web-callable method saves tags (provided via form parameter "new_tags").
- Testcases:
- No testcase defined.
www-toggle-publish-status (scripted, public)
<instance of xowiki::Page> www-toggle-publish-status \ [ -return_url return_url ]This web-callable method toggles from "production" to "ready", and from "ready" or "archived" to "production". The return_url can be passed in for cases, where some proc calls internally this function, since update_publish_status might have to initialize some related objects, which might modify the return_url as well (e.g., workflows with specialized return_url handling).
- Switches:
- -return_url (optional)
- Testcases:
- No testcase defined.
www-validate-attribute (scripted, public)
<instance of xowiki::Page> www-validate-attributeThis web-callable method can be used to validate form attributes, typically called via AJAX.
- Testcases:
- No testcase defined.
www-view (scripted, public)
<instance of xowiki::Page> www-view [ content ]This web-callable method is called when viewing wiki content. The method "view" is used primarily as web API call, when the xowiki page is viewed. It is not intended for e.g. embedded wiki pages (use includes), since it contains full framing, etc. In most cases, the argument "content" is not provided, and it is computed via the "render" method of the current object. It is as well possible to reuse the rendering logic of the method for other pages, where some HTML content is already computed, but it should be viewed exactly as in the page viewing cases.
- Parameters:
- content (optional)
- Testcases:
- xowiki_test_cases
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables