Methods for working with CMS pages
This is the code documentation for the SproutCMS project
Search documentation |
class PageMethods for working with CMS pages
Extending this class<?php /** * New class description goes here * * @author Your Name, 2024-11-25 **/ class NewClassName extends Page { /** * Traverse page node to extract page links **/ private function determineNodeLinks (TreeNode $node, int $depth) { // Method code goes here } /** * Return list of related links for given page **/ public function determineRelatedLinks (int $page_id) { // Method code goes here } /** * Get the page id for a given URL **/ public function lookupUrl ($url) { // Method code goes here } /** * Return the URL for a page, when given the page id * The URLs are relative **/ public function url (int $id) { // Method code goes here } /** * Fetches the URL for a tool page for a specific controller entrance method **/ public function toolUrl (string|Controller $class, string $method) { // Method code goes here } /** * Set up metadata and social metadata for a tool page **/ public function setupToolPage () { // Method code goes here } /** * Load page metadata - description and keywords **/ public function loadPageMeta (array $page) { // Method code goes here } /** * Load page social - title, image, description, url **/ public function loadPageSocial (array $page, Pagenode $node) { // Method code goes here } /** * Inject page details -- title and browser title -- into a skin view **/ public function injectPageSkin (View $skin, array $page) { // Method code goes here } /** * Gets the embedded widgets (i.e. content blocks) for a page **/ public function getContentWidgets (int $rev_id, string $include) { // Method code goes here } /** * Get the page text for a page id, in HTML format, with widgets and everything, ready to go **/ public function getText (int $page_id, int $rev_id, int $subsite_id) { // Method code goes here } /** * Returns an array of key-value pairs of all attributes for a page **/ public function attrs ($id) { // Method code goes here } /** * Returns an array pages which contain a given attribute. **/ public function pagesWithAttr (string $attr_name, string $attr_value) { // Method code goes here } /** * Find pages with a given widget, and optionally the specified settings. * Only widgets on live revisions of active pages are checked. **/ public function pagesWithWidget (string $widget_name, array $settings) { // Method code goes here } /** * Return the last-modified date of the specified page. * Returns NULL on error. * * If you don't provide a page-id, uses the id of the * Navigation::matchedNode() * * The date is formatted using the php date function. * The default date format is "d/m/Y". **/ public function lastModified (int $page_id, string $date_format) { // Method code goes here } /** * Makes a particular revision live, and changes the status of the previous live revision to 'old'. * Should be run inside a transaction. **/ public function activateRevision (ID $rev_id) { // Method code goes here } } ?> |
Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |