Overview

Namespaces

  • None
  • PHP

Classes

  • Breadcrumb
  • Breadcrumbs
  • CacheFile
  • Comment
  • CommentArray
  • CommentFilter
  • CommentForm
  • CommentList
  • Config
  • Database
  • DatabaseQuery
  • DatabaseQuerySelect
  • DatabaseQuerySelectFulltext
  • DatabaseStopwords
  • Debug
  • Field
  • Fieldgroup
  • Fieldgroups
  • FieldgroupsArray
  • Fields
  • FieldsArray
  • Fieldtype
  • FieldtypeMulti
  • Fieldtypes
  • FileLog
  • FilenameArray
  • Fuel
  • HookEvent
  • ImageSizer
  • Inputfield
  • InputfieldsArray
  • InputfieldWrapper
  • Language
  • LanguageParser
  • Languages
  • LanguagesPageFieldValue
  • LanguageSupportInstall
  • LanguageTranslator
  • Markdown_Parser
  • MarkdownExtra_Parser
  • ModuleJS
  • ModulePlaceholder
  • Modules
  • Notice
  • NoticeError
  • NoticeMessage
  • Notices
  • NullPage
  • Page
  • PageArray
  • Pagefile
  • Pagefiles
  • PagefilesManager
  • PageFinder
  • Pageimage
  • Pageimages
  • PagerNav
  • PagerNavItem
  • Pages
  • PagesAccess
  • PagesSortfields
  • PagesType
  • Paths
  • Permission
  • Permissions
  • Process
  • ProcessController
  • ProcessWire
  • Role
  • Roles
  • Sanitizer
  • Selector
  • SelectorBitwiseAnd
  • SelectorContains
  • SelectorContainsLike
  • SelectorContainsWords
  • SelectorEnds
  • SelectorEqual
  • SelectorGreaterThan
  • SelectorGreaterThanEqual
  • SelectorLessThan
  • SelectorLessThanEqual
  • SelectorNotEqual
  • Selectors
  • SelectorStarts
  • Session
  • SessionCSRF
  • SmartyPants_Parser
  • SmartyPantsTypographer_Parser
  • SystemUpdate1
  • Template
  • TemplateFile
  • Templates
  • TemplatesArray
  • Textformatter
  • Textile
  • User
  • Users
  • Wire
  • WireArray
  • WireData
  • WireInput
  • WireInputData
  • WireSaveableItems
  • WireSaveableItemsLookup
  • WireUpload

Interfaces

  • CommentFormInterface
  • CommentListInterface
  • ConfigurableModule
  • FieldtypeLanguageInterface
  • FieldtypePageTitleCompatible
  • HasLookupItems
  • HasRoles
  • InputfieldHasArrayValue
  • Module
  • Saveable
  • TrackChanges

Exceptions

  • ProcessController404Exception
  • ProcessControllerPermissionException
  • Wire404Exception
  • WireDatabaseException
  • WireException
  • WirePermissionException

Functions

  • __
  • _n
  • _x
  • fuel
  • identify_modifier_markdown
  • Markdown
  • mdwp_add_p
  • mdwp_hide_tags
  • mdwp_show_tags
  • mdwp_strip_p
  • ProcessWireClassLoader
  • ProcessWireHostSiteConfig
  • ProcessWireShutdown
  • removeNewlines
  • SmartDashes
  • SmartEllipsis
  • SmartQuotes
  • smarty_modifier_markdown
  • smarty_modifier_smartypants
  • SmartyPants
  • tabIndent
  • unregisterGLOBALS
  • wire
  • wireDecodeJSON
  • wireEncodeJSON
  • wireMkdir
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

Class PagesAccess

ProcessWire Pages Access

Maintains the pages_access table which serves as a way to line up pages to the templates that maintain their access roles.

This class serves as a way for pageFinder() to determine if a user has access to a page before actually loading it.

The pages_access template contains just two columns:

  • pages_id: Any given page
  • templates_id: The template that sets this pages access

Pages using templates that already define their access (determined by $template->useRoles) are ommitted from the pages_access table, as they aren't necessary.

ProcessWire 2.x Copyright (C) 2011 by Ryan Cramer Licensed under GNU/GPL v2, see LICENSE.TXT

http://www.processwire.com http://www.ryancramer.com

Wire implements TrackChanges
Extended by PagesAccess
Located at core/PagesAccess.php
Methods summary
public
# __construct( Page|Template $item = null )

Construct a PagesAccess instance, optionally specifying a Page or Template

Construct a PagesAccess instance, optionally specifying a Page or Template

If Page or Template specified, then the updateTemplate or updatePage method is assumed.

Parameters

$item
Page|Template
public
# rebuild( $parent_id = 1, $accessTemplateID = 0, $doDeletions = true )

Rebuild the entire pages_access table (or a part of it) starting from the given parent_id

Rebuild the entire pages_access table (or a part of it) starting from the given parent_id

public
# updateTemplate( Template $template )

Update the pages_access table for the given Template

Update the pages_access table for the given Template

To be called when a template's 'useRoles' property has changed.

public
# updatePage( Page $page )

Save to pages_access table to indicate what template each page is getting it's access from

Save to pages_access table to indicate what template each page is getting it's access from

This should be called a page has been saved and it's parent or template has changed. Or, when a new page is added.

If there is no entry in this table, then the page is getting it's access from it's existing template.

This is used by PageFinder to determine what pages to include in a find() operation based on user access.

Parameters

$page
Page
public
# deletePage( Page $page )

Delete a page from the pages_access table

Delete a page from the pages_access table

protected
# getTemplates( )

Returns an array of templates that DON'T define access

Returns an array of templates that DON'T define access

protected
# getAccessTemplates( )

Returns an array of templates that DO define access

Returns an array of templates that DO define access

Methods inherited from Wire
_(), ___changed(), __call(), __get(), __toString(), _n(), _x(), addHook(), addHookAfter(), addHookBefore(), addHookProperty(), className(), error(), fuel(), getAllFuel(), getChanges(), getFuel(), getHooks(), isChanged(), isHooked(), message(), removeHook(), resetTrackChanges(), runHooks(), setFuel(), setTrackChanges(), trackChange(), trackChanges(), untrackChange(), useFuel()
Properties summary
protected array $_templates array()
#

Cached templates that don't define access

Cached templates that don't define access

protected array $_accessTemplates array()
#

Cached templates that DO define access

Cached templates that DO define access

protected array $completedParentIDs array()
#

Array of page parent IDs that have already been completed

Array of page parent IDs that have already been completed

Properties inherited from Wire
$changes, $defaultHookOptions, $fuel, $hookMethodCache, $localHooks, $staticHooks, $trackChanges, $useFuel
ProcessWire API documentation generated by ApiGen 2.6.0