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
 1: <?php
 2: 
 3: /**
 4:  * ProcessWire ModuleJS
 5:  *
 6:  * An abstract module intended as a base for modules needing to autoload JS or CSS files. 
 7:  *
 8:  * If you extend this, double check that the default isSingular() and isAutoload() methods 
 9:  * are doing what you want -- you may want to override them. 
10:  * 
11:  * See the Module interface (Module.php) for details about each method. 
12:  * 
13:  * ProcessWire 2.x 
14:  * Copyright (C) 2010 by Ryan Cramer 
15:  * Licensed under GNU/GPL v2, see LICENSE.TXT
16:  * 
17:  * http://www.processwire.com
18:  * http://www.ryancramer.com
19:  *
20:  */
21: 
22: abstract class ModuleJS extends WireData implements Module {
23: 
24:     /**
25:      * Per the Module interface, return an array of information about the Module
26:      *
27:      */
28:     public static function getModuleInfo() {
29:         return array(
30:             'title' => '',      // printable name/title of module
31:             'version' => 001,   // version number of module
32:             'summary' => '',    // 1 sentence summary of module
33:             'href' => '',       // URL to more information (optional)
34:             'permanent' => false,   // true if module is permanent and thus not uninstallable
35:             ); 
36:     }
37: 
38:     /**
39:      * Per the Module interface, Initialize the Process, loading any related CSS or JS files
40:      *
41:      */
42:     public function init() { 
43:         $class = $this->className();
44:         if(is_file($this->config->paths->$class . "$class.css")) $this->config->styles->add($this->config->urls->$class . "$class.css"); 
45:         if(is_file($this->config->paths->$class . "$class.js")) $this->config->scripts->add($this->config->urls->$class . "$class.js"); 
46:     }
47: 
48:     public function ___install() { }
49:     public function ___uninstall() { }
50:     public function isSingular() { return true; }   
51:     public function isAutoload() { return false; }
52: }
53: 
54: 
ProcessWire API documentation generated by ApiGen 2.6.0