JOOMLA中国
  • Joomla中国首页
  • 社区
  • 教程
  • 应用市场
  • B计划
Joomla! Framework TM
  • Namespace
  • Class
  • Tree
  • Deprecated

Namespaces

  • Composer
    • Autoload
  • Joomla
    • Application
      • Cli
        • Output
          • Processor
      • Web
    • Data
    • DI
      • Exception
    • Event
    • Filter
    • Input
    • Ldap
    • Registry
      • Format
    • Session
      • Storage
    • String
    • Uri
    • Utilities
  • None
  • PasswordCompat
    • binary
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Yaml
        • Exception
    • Polyfill
      • Util

Classes

  • CallbackFilterIterator
  • ComposerAutoloaderInit205c915b9c7d3e718e7c95793ee67ffe
  • easyparse
  • EasyPeasyICS
  • FOFAutoloaderComponent
  • FOFAutoloaderFof
  • FOFConfigDomainDispatcher
  • FOFConfigDomainTables
  • FOFConfigDomainViews
  • FOFConfigProvider
  • FOFController
  • FOFDatabase
  • FOFDatabaseDriver
  • FOFDatabaseDriverJoomla
  • FOFDatabaseDriverMysql
  • FOFDatabaseDriverMysqli
  • FOFDatabaseDriverOracle
  • FOFDatabaseDriverPdo
  • FOFDatabaseDriverPdomysql
  • FOFDatabaseDriverPostgresql
  • FOFDatabaseDriverSqlazure
  • FOFDatabaseDriverSqlite
  • FOFDatabaseDriverSqlsrv
  • FOFDatabaseFactory
  • FOFDatabaseInstaller
  • FOFDatabaseIterator
  • FOFDatabaseIteratorAzure
  • FOFDatabaseIteratorMysql
  • FOFDatabaseIteratorMysqli
  • FOFDatabaseIteratorOracle
  • FOFDatabaseIteratorPdo
  • FOFDatabaseIteratorPdomysql
  • FOFDatabaseIteratorPostgresql
  • FOFDatabaseIteratorSqlite
  • FOFDatabaseIteratorSqlsrv
  • FOFDatabaseQuery
  • FOFDatabaseQueryElement
  • FOFDatabaseQueryMysql
  • FOFDatabaseQueryMysqli
  • FOFDatabaseQueryOracle
  • FOFDatabaseQueryPdo
  • FOFDatabaseQueryPdomysql
  • FOFDatabaseQueryPostgresql
  • FOFDatabaseQuerySqlazure
  • FOFDatabaseQuerySqlite
  • FOFDatabaseQuerySqlsrv
  • FOFDispatcher
  • FOFDownload
  • FOFDownloadAdapterAbstract
  • FOFDownloadAdapterCurl
  • FOFDownloadAdapterFopen
  • FOFEncryptAes
  • FOFEncryptAesAbstract
  • FOFEncryptAesMcrypt
  • FOFEncryptAesOpenssl
  • FOFEncryptBase32
  • FOFEncryptRandval
  • FOFEncryptTotp
  • FOFForm
  • FOFFormFieldAccesslevel
  • FOFFormFieldActions
  • FOFFormFieldButton
  • FOFFormFieldCachehandler
  • FOFFormFieldCalendar
  • FOFFormFieldCaptcha
  • FOFFormFieldCheckbox
  • FOFFormFieldCheckboxes
  • FOFFormFieldComponents
  • FOFFormFieldEditor
  • FOFFormFieldEmail
  • FOFFormFieldGroupedbutton
  • FOFFormFieldGroupedlist
  • FOFFormFieldHidden
  • FOFFormFieldImage
  • FOFFormFieldImagelist
  • FOFFormFieldInteger
  • FOFFormFieldLanguage
  • FOFFormFieldList
  • FOFFormFieldMedia
  • FOFFormFieldModel
  • FOFFormFieldOrdering
  • FOFFormFieldPassword
  • FOFFormFieldPlugins
  • FOFFormFieldPublished
  • FOFFormFieldRadio
  • FOFFormFieldRelation
  • FOFFormFieldRules
  • FOFFormFieldSelectrow
  • FOFFormFieldSessionhandler
  • FOFFormFieldSpacer
  • FOFFormFieldSql
  • FOFFormFieldTag
  • FOFFormFieldTel
  • FOFFormFieldText
  • FOFFormFieldTextarea
  • FOFFormFieldTimezone
  • FOFFormFieldTitle
  • FOFFormFieldUrl
  • FOFFormFieldUser
  • FOFFormFieldUsergroup
  • FOFFormHeader
  • FOFFormHeaderAccesslevel
  • FOFFormHeaderField
  • FOFFormHeaderFielddate
  • FOFFormHeaderFieldfilterable
  • FOFFormHeaderFieldsearchable
  • FOFFormHeaderFieldselectable
  • FOFFormHeaderFieldsql
  • FOFFormHeaderFilterdate
  • FOFFormHeaderFilterfilterable
  • FOFFormHeaderFiltersearchable
  • FOFFormHeaderFilterselectable
  • FOFFormHeaderFiltersql
  • FOFFormHeaderLanguage
  • FOFFormHeaderModel
  • FOFFormHeaderOrdering
  • FOFFormHeaderPublished
  • FOFFormHeaderRowselect
  • FOFFormHelper
  • FOFHalDocument
  • FOFHalLink
  • FOFHalLinks
  • FOFHalRenderJson
  • FOFInflector
  • FOFInput
  • FOFIntegrationJoomlaFilesystem
  • FOFIntegrationJoomlaPlatform
  • FOFLayoutFile
  • FOFLayoutHelper
  • FOFLess
  • FOFLessFormatterClassic
  • FOFLessFormatterCompressed
  • FOFLessFormatterJoomla
  • FOFLessFormatterLessjs
  • FOFLessParser
  • FOFModel
  • FOFModelBehavior
  • FOFModelBehaviorAccess
  • FOFModelBehaviorEmptynonzero
  • FOFModelBehaviorEnabled
  • FOFModelBehaviorFilters
  • FOFModelBehaviorLanguage
  • FOFModelBehaviorPrivate
  • FOFModelDispatcherBehavior
  • FOFModelField
  • FOFModelFieldBoolean
  • FOFModelFieldDate
  • FOFModelFieldNumber
  • FOFModelFieldText
  • FOFPlatform
  • FOFPlatformFilesystem
  • FOFQueryAbstract
  • FOFRenderAbstract
  • FOFRenderJoomla
  • FOFRenderJoomla3
  • FOFRenderStrapper
  • FOFStringUtils
  • FOFTable
  • FOFTableBehavior
  • FOFTableBehaviorAssets
  • FOFTableBehaviorContenthistory
  • FOFTableBehaviorTags
  • FOFTableDispatcherBehavior
  • FOFTableNested
  • FOFTableRelations
  • FOFTemplateUtils
  • FOFToolbar
  • FOFUtilsArray
  • FOFUtilsCacheCleaner
  • FOFUtilsConfigHelper
  • FOFUtilsFilescheck
  • FOFUtilsIniParser
  • FOFUtilsInstallscript
  • FOFUtilsIp
  • FOFUtilsObject
  • FOFUtilsObservableDispatcher
  • FOFUtilsObservableEvent
  • FOFUtilsPhpfunc
  • FOFUtilsTimer
  • FOFUtilsUpdate
  • FOFUtilsUpdateCollection
  • FOFUtilsUpdateExtension
  • FOFUtilsUpdateJoomla
  • FOFView
  • FOFViewCsv
  • FOFViewForm
  • FOFViewHtml
  • FOFViewJson
  • FOFViewRaw
  • idna_convert
  • JAccess
  • JAccessRule
  • JAccessRules
  • JAccessWrapperAccess
  • JAdapter
  • JAdapterInstance
  • JApplication
  • JApplicationAdministrator
  • JApplicationBase
  • JApplicationCli
  • JApplicationCms
  • JApplicationDaemon
  • JApplicationHelper
  • JApplicationSite
  • JApplicationWeb
  • JApplicationWebRouter
  • JApplicationWebRouterBase
  • JApplicationWebRouterRest
  • JArchive
  • JArchiveBzip2
  • JArchiveGzip
  • JArchiveTar
  • JArchiveWrapperArchive
  • JArchiveZip
  • JArrayHelper
  • JAssociationExtensionHelper
  • JAuthentication
  • JAuthenticationHelper
  • JAuthenticationResponse
  • JBrowser
  • JBuffer
  • JButton
  • JCache
  • JCacheController
  • JCacheControllerCallback
  • JCacheControllerOutput
  • JCacheControllerPage
  • JCacheControllerView
  • JCacheStorage
  • JCacheStorageApc
  • JCacheStorageApcu
  • JCacheStorageCachelite
  • JCacheStorageFile
  • JCacheStorageHelper
  • JCacheStorageMemcache
  • JCacheStorageMemcached
  • JCacheStorageRedis
  • JCacheStorageWincache
  • JCacheStorageXcache
  • JCaptcha
  • JCategories
  • JCategoryNode
  • JClassLoader
  • JCli
  • JClientFtp
  • JClientHelper
  • JClientLdap
  • JClientWrapperHelper
  • JComponentHelper
  • JComponentRecord
  • JComponentRouterBase
  • JComponentRouterLegacy
  • JComponentRouterRulesMenu
  • JComponentRouterRulesNomenu
  • JComponentRouterRulesStandard
  • JComponentRouterView
  • JComponentRouterViewconfiguration
  • JControllerAdmin
  • JControllerBase
  • JControllerForm
  • JControllerLegacy
  • JCrypt
  • JCryptCipher3Des
  • JCryptCipherBlowfish
  • JCryptCipherCrypto
  • JCryptCipherMcrypt
  • JCryptCipherRijndael256
  • JCryptCipherSimple
  • JCryptKey
  • JCryptPasswordSimple
  • JDaemon
  • JDatabase
  • JDatabaseDriver
  • JDatabaseDriverMysql
  • JDatabaseDriverMysqli
  • JDatabaseDriverOracle
  • JDatabaseDriverPdo
  • JDatabaseDriverPdomysql
  • JDatabaseDriverPostgresql
  • JDatabaseDriverSqlazure
  • JDatabaseDriverSqlite
  • JDatabaseDriverSqlsrv
  • JDatabaseExporter
  • JDatabaseExporterMysql
  • JDatabaseExporterMysqli
  • JDatabaseExporterPdomysql
  • JDatabaseExporterPostgresql
  • JDatabaseFactory
  • JDatabaseImporter
  • JDatabaseImporterMysql
  • JDatabaseImporterMysqli
  • JDatabaseImporterPdomysql
  • JDatabaseImporterPostgresql
  • JDatabaseInterface
  • JDatabaseIterator
  • JDatabaseIteratorMysql
  • JDatabaseIteratorMysqli
  • JDatabaseIteratorOracle
  • JDatabaseIteratorPdo
  • JDatabaseIteratorPdomysql
  • JDatabaseIteratorPostgresql
  • JDatabaseIteratorSqlazure
  • JDatabaseIteratorSqlite
  • JDatabaseIteratorSqlsrv
  • JDatabaseMysql
  • JDatabaseMysqli
  • JDatabaseQuery
  • JDatabaseQueryElement
  • JDatabaseQueryLimitable
  • JDatabaseQueryMysql
  • JDatabaseQueryMysqli
  • JDatabaseQueryOracle
  • JDatabaseQueryPdo
  • JDatabaseQueryPdomysql
  • JDatabaseQueryPostgresql
  • JDatabaseQueryPreparable
  • JDatabaseQuerySqlazure
  • JDatabaseQuerySqlite
  • JDatabaseQuerySqlsrv
  • JDatabaseSqlazure
  • JDatabaseSqlsrv
  • JDate
  • JDispatcher
  • JDocument
  • JDocumentError
  • JDocumentFeed
  • JDocumentHtml
  • JDocumentImage
  • JDocumentJson
  • JDocumentOpensearch
  • JDocumentRaw
  • JDocumentRenderer
  • JDocumentRendererAtom
  • JDocumentRendererComponent
  • JDocumentRendererFeedAtom
  • JDocumentRendererFeedRss
  • JDocumentRendererHead
  • JDocumentRendererHtmlComponent
  • JDocumentRendererHtmlHead
  • JDocumentRendererHtmlMessage
  • JDocumentRendererHtmlModule
  • JDocumentRendererHtmlModules
  • JDocumentRendererMessage
  • JDocumentRendererModule
  • JDocumentRendererModules
  • JDocumentRendererRSS
  • JDocumentXml
  • JEditor
  • JError
  • JErrorPage
  • JEvent
  • JEventDispatcher
  • JExtension
  • JFacebook
  • JFacebookAlbum
  • JFacebookCheckin
  • JFacebookComment
  • JFacebookEvent
  • JFacebookGroup
  • JFacebookLink
  • JFacebookNote
  • JFacebookOAuth
  • JFacebookObject
  • JFacebookPhoto
  • JFacebookPost
  • JFacebookStatus
  • JFacebookUser
  • JFacebookVideo
  • JFactory
  • JFeed
  • JFeedEnclosure
  • JFeedEntry
  • JFeedFactory
  • JFeedImage
  • JFeedItem
  • JFeedLink
  • JFeedParser
  • JFeedParserAtom
  • JFeedParserRss
  • JFeedParserRssItunes
  • JFeedParserRssMedia
  • JFeedPerson
  • JFile
  • JFilesystemHelper
  • JFilesystemPatcher
  • JFilesystemWrapperFile
  • JFilesystemWrapperFolder
  • JFilesystemWrapperPath
  • JFilterInput
  • JFilterOutput
  • JFilterWrapperOutput
  • JFolder
  • JForm
  • JFormField
  • JFormFieldAccessLevel
  • JFormFieldAliastag
  • JFormFieldAuthor
  • JFormFieldCacheHandler
  • JFormFieldCalendar
  • JFormFieldCaptcha
  • JFormFieldCategory
  • JFormFieldCheckbox
  • JFormFieldCheckboxes
  • JFormFieldChromeStyle
  • JFormFieldColor
  • JFormFieldCombo
  • JFormFieldComponentlayout
  • JFormFieldComponents
  • JFormFieldContenthistory
  • JFormFieldContentlanguage
  • JFormFieldContenttype
  • JFormFieldDatabaseConnection
  • JFormFieldEditor
  • JFormFieldEMail
  • JFormFieldFile
  • JFormFieldFileList
  • JFormFieldFolderList
  • JFormFieldFrontend_Language
  • JFormFieldGroupedList
  • JFormFieldHeadertag
  • JFormFieldHelpsite
  • JFormFieldHidden
  • JFormFieldImageList
  • JFormFieldInteger
  • JFormFieldLanguage
  • JFormFieldLastvisitDateRange
  • JFormFieldLimitbox
  • JFormFieldList
  • JFormFieldMedia
  • JFormFieldMenu
  • JFormFieldMenuitem
  • JFormFieldMeter
  • JFormFieldModulelayout
  • JFormFieldModuleOrder
  • JFormFieldModulePosition
  • JFormFieldModuletag
  • JFormFieldNote
  • JFormFieldNumber
  • JFormFieldOrdering
  • JFormFieldPassword
  • JFormFieldPlugin_Status
  • JFormFieldPlugins
  • JFormFieldPredefinedList
  • JFormFieldRadio
  • JFormFieldRange
  • JFormFieldRegistrationDateRange
  • JFormFieldRepeatable
  • JFormFieldRules
  • JFormFieldSessionHandler
  • JFormFieldSpacer
  • JFormFieldSQL
  • JFormFieldStatus
  • JFormFieldSubform
  • JFormFieldTag
  • JFormFieldTel
  • JFormFieldTemplatestyle
  • JFormFieldText
  • JFormFieldTextarea
  • JFormFieldTimezone
  • JFormFieldUrl
  • JFormFieldUser
  • JFormFieldUserActive
  • JFormFieldUsergroup
  • JFormFieldUserGroupList
  • JFormFieldUserState
  • JFormHelper
  • JFormRule
  • JFormRuleBoolean
  • JFormRuleCalendar
  • JFormRuleCaptcha
  • JFormRuleColor
  • JFormRuleEmail
  • JFormRuleEquals
  • JFormRuleNotequals
  • JFormRuleNumber
  • JFormRuleOptions
  • JFormRulePassword
  • JFormRuleRules
  • JFormRuleTel
  • JFormRuleUrl
  • JFormRuleUsername
  • JFormWrapperHelper
  • JFTP
  • JGithub
  • JGithubAccount
  • JGithubCommits
  • JGithubForks
  • JGithubHooks
  • JGithubHttp
  • JGithubMeta
  • JGithubMilestones
  • JGithubObject
  • JGithubPackage
  • JGithubPackageActivity
  • JGithubPackageActivityEvents
  • JGithubPackageActivityNotifications
  • JGithubPackageActivityStarring
  • JGithubPackageActivityWatching
  • JGithubPackageAuthorization
  • JGithubPackageData
  • JGithubPackageDataBlobs
  • JGithubPackageDataCommits
  • JGithubPackageDataRefs
  • JGithubPackageDataTags
  • JGithubPackageDataTrees
  • JGithubPackageGists
  • JGithubPackageGistsComments
  • JGithubPackageGitignore
  • JGithubPackageIssues
  • JGithubPackageIssuesAssignees
  • JGithubPackageIssuesComments
  • JGithubPackageIssuesEvents
  • JGithubPackageIssuesLabels
  • JGithubPackageIssuesMilestones
  • JGithubPackageMarkdown
  • JGithubPackageOrgs
  • JGithubPackageOrgsMembers
  • JGithubPackageOrgsTeams
  • JGithubPackagePulls
  • JGithubPackagePullsComments
  • JGithubPackageRepositories
  • JGithubPackageRepositoriesCollaborators
  • JGithubPackageRepositoriesComments
  • JGithubPackageRepositoriesCommits
  • JGithubPackageRepositoriesContents
  • JGithubPackageRepositoriesDownloads
  • JGithubPackageRepositoriesForks
  • JGithubPackageRepositoriesHooks
  • JGithubPackageRepositoriesKeys
  • JGithubPackageRepositoriesMerging
  • JGithubPackageRepositoriesStatistics
  • JGithubPackageRepositoriesStatuses
  • JGithubPackageSearch
  • JGithubPackageUsers
  • JGithubPackageUsersEmails
  • JGithubPackageUsersFollowers
  • JGithubPackageUsersKeys
  • JGithubRefs
  • JGithubStatuses
  • JGoogle
  • JGoogleAuth
  • JGoogleAuthOauth2
  • JGoogleData
  • JGoogleDataAdsense
  • JGoogleDataCalendar
  • JGoogleDataPicasa
  • JGoogleDataPicasaAlbum
  • JGoogleDataPicasaPhoto
  • JGoogleDataPlus
  • JGoogleDataPlusActivities
  • JGoogleDataPlusComments
  • JGoogleDataPlusPeople
  • JGoogleEmbed
  • JGoogleEmbedAnalytics
  • JGoogleEmbedMaps
  • JGrid
  • JHelp
  • JHelper
  • JHelperContent
  • JHelperContenthistory
  • JHelperMedia
  • JHelperRoute
  • JHelperTags
  • JHelperUsergroups
  • JHtml
  • JHtmlAccess
  • JHtmlActionsDropdown
  • JHtmlBatch
  • JHtmlBehavior
  • JHtmlBootstrap
  • JHtmlCategory
  • JHtmlContent
  • JHtmlContentLanguage
  • JHtmlDate
  • JHtmlDebug
  • JHtmlDropdown
  • JHtmlEmail
  • JHtmlForm
  • JHtmlFormbehavior
  • JHtmlGrid
  • JHtmlIcons
  • JHtmlJGrid
  • JHtmlJquery
  • JHtmlLinks
  • JHtmlList
  • JHtmlMenu
  • JHtmlNumber
  • JHtmlRules
  • JHtmlSearchtools
  • JHtmlSelect
  • JHtmlSidebar
  • JHtmlSliders
  • JHtmlSortablelist
  • JHtmlString
  • JHtmlTabs
  • JHtmlTag
  • JHtmlTel
  • JHtmlUser
  • JHttp
  • JHttpFactory
  • JHttpResponse
  • JHttpTransportCurl
  • JHttpTransportSocket
  • JHttpTransportStream
  • JHttpWrapperFactory
  • JImage
  • JImageFilter
  • JImageFilterBackgroundfill
  • JImageFilterBrightness
  • JImageFilterContrast
  • JImageFilterEdgedetect
  • JImageFilterEmboss
  • JImageFilterGrayscale
  • JImageFilterNegate
  • JImageFilterSketchy
  • JImageFilterSmooth
  • JInput
  • JInputCli
  • JInputCookie
  • JInputFiles
  • JInputJSON
  • JInstaller
  • JInstallerAdapter
  • JInstallerAdapterComponent
  • JInstallerAdapterFile
  • JInstallerAdapterLanguage
  • JInstallerAdapterLibrary
  • JInstallerAdapterModule
  • JInstallerAdapterPackage
  • JInstallerAdapterPlugin
  • JInstallerAdapterTemplate
  • JInstallerComponent
  • JInstallerExtension
  • JInstallerFile
  • JInstallerHelper
  • JInstallerLanguage
  • JInstallerLibrary
  • JInstallerManifest
  • JInstallerManifestLibrary
  • JInstallerManifestPackage
  • JInstallerModule
  • JInstallerPackage
  • JInstallerPlugin
  • JInstallerScript
  • JInstallerTemplate
  • JKeychain
  • JLanguage
  • JLanguageAssociations
  • JLanguageHelper
  • JLanguageMultilang
  • JLanguageStemmer
  • JLanguageStemmerPorteren
  • JLanguageTransliterate
  • JLanguageWrapperHelper
  • JLanguageWrapperText
  • JLanguageWrapperTransliterate
  • JLayoutBase
  • JLayoutFile
  • JLayoutHelper
  • JLDAP
  • JLess
  • JLessFormatterJoomla
  • JLibraryHelper
  • JLinkedin
  • JLinkedinCommunications
  • JLinkedinCompanies
  • JLinkedinGroups
  • JLinkedinJobs
  • JLinkedinOauth
  • JLinkedinObject
  • JLinkedinPeople
  • JLinkedinStream
  • JLoader
  • JLog
  • JLogEntry
  • JLogger
  • JLogLogger
  • JLogLoggerCallback
  • JLogLoggerDatabase
  • JLogLoggerEcho
  • JLogLoggerFormattedtext
  • JLogLoggerMessagequeue
  • JLogLoggerSyslog
  • JLogLoggerW3c
  • JMail
  • JMailHelper
  • JMailWrapperHelper
  • JMediawiki
  • JMediawikiCategories
  • JMediawikiHttp
  • JMediawikiImages
  • JMediawikiLinks
  • JMediawikiObject
  • JMediawikiPages
  • JMediawikiSearch
  • JMediawikiSites
  • JMediawikiUsers
  • JMenu
  • JMenuAdministrator
  • JMenuItem
  • JMenuSite
  • JMicrodata
  • JModelAdmin
  • JModelBase
  • JModelDatabase
  • JModelForm
  • JModelItem
  • JModelLegacy
  • JModelList
  • JModuleHelper
  • JNode
  • JOAuth1Client
  • JOAuth2Client
  • JObject
  • JObservable
  • JObserver
  • JObserverMapper
  • JObserverUpdater
  • JObserverWrapperMapper
  • JOpenSearchImage
  • JOpenSearchUrl
  • JOpenstreetmap
  • JOpenstreetmapChangesets
  • JOpenstreetmapElements
  • JOpenstreetmapGps
  • JOpenstreetmapInfo
  • JOpenstreetmapOauth
  • JOpenstreetmapObject
  • JOpenstreetmapUser
  • JPagination
  • JPaginationObject
  • JPath
  • JPathway
  • JPathwaySite
  • JPlatform
  • JPlugin
  • JPluginHelper
  • JProfiler
  • JRequest
  • JResponse
  • JResponseJson
  • JRoute
  • JRouter
  • JRouterAdministrator
  • JRouterSite
  • JRouteWrapperRoute
  • JRule
  • JRules
  • JSchemaChangeitem
  • JSchemaChangeitemMysql
  • JSchemaChangeitemPostgresql
  • JSchemaChangeitemSqlsrv
  • JSchemaChangeset
  • JSearchHelper
  • JSession
  • JSessionHandlerJoomla
  • JSessionHandlerNative
  • JSessionStorage
  • JSessionStorageApc
  • JSessionStorageDatabase
  • JSessionStorageMemcache
  • JSessionStorageMemcached
  • JSessionStorageNone
  • JSessionStorageWincache
  • JSessionStorageXcache
  • JSimplecrypt
  • JSimplepieFactory
  • JStream
  • JStreamString
  • JString
  • JStringController
  • JStringPunycode
  • JStringWrapperNormalise
  • JStringWrapperPunycode
  • JTable
  • JTableAsset
  • JTableCategory
  • JTableContent
  • JTableContenthistory
  • JTableContenttype
  • JTableCorecontent
  • JTableExtension
  • JTableInterface
  • JTableLanguage
  • JTableMenu
  • JTableMenuType
  • JTableModule
  • JTableNested
  • JTableObserver
  • JTableObserverContenthistory
  • JTableObserverTags
  • JTableSession
  • JTableUcm
  • JTableUpdate
  • JTableUpdatesite
  • JTableUser
  • JTableUsergroup
  • JTableViewlevel
  • JText
  • JToolbar
  • JToolbarButton
  • JToolbarButtonConfirm
  • JToolbarButtonCustom
  • JToolbarButtonHelp
  • JToolbarButtonLink
  • JToolbarButtonPopup
  • JToolbarButtonSeparator
  • JToolbarButtonSlider
  • JToolbarButtonStandard
  • JTree
  • JTwitter
  • JTwitterBlock
  • JTwitterDirectmessages
  • JTwitterFavorites
  • JTwitterFriends
  • JTwitterHelp
  • JTwitterLists
  • JTwitterOAuth
  • JTwitterObject
  • JTwitterPlaces
  • JTwitterProfile
  • JTwittersearch
  • JTwitterStatuses
  • JTwitterTrends
  • JTwitterUsers
  • JUcmBase
  • JUcmContent
  • JUcmType
  • JUpdate
  • JUpdateAdapter
  • JUpdater
  • JUpdaterCollection
  • JUpdaterExtension
  • JUri
  • JUser
  • JUserHelper
  • JUserWrapperHelper
  • JUtility
  • JVersion
  • JViewBase
  • JViewCategories
  • JViewCategory
  • JViewCategoryfeed
  • JViewHtml
  • JViewLegacy
  • JWeb
  • JWebClient
  • JXMLElement
  • lessc
  • lessc_formatter_classic
  • lessc_formatter_compressed
  • lessc_formatter_lessjs
  • lessc_parser
  • lessify
  • Net_IDNA_php4
  • nodecounter
  • ntlm_sasl_client_class
  • PHPMailer
  • PHPMailerOAuth
  • PHPMailerOAuthGoogle
  • POP3
  • SimplePie
  • SimplePie_Author
  • SimplePie_Autoloader
  • SimplePie_Cache
  • SimplePie_Cache_DB
  • SimplePie_Cache_File
  • SimplePie_Cache_Memcache
  • SimplePie_Cache_MySQL
  • SimplePie_Caption
  • SimplePie_Category
  • SimplePie_Content_Type_Sniffer
  • SimplePie_Copyright
  • SimplePie_Core
  • SimplePie_Credit
  • SimplePie_Decode_HTML_Entities
  • SimplePie_Enclosure
  • SimplePie_File
  • SimplePie_gzdecode
  • SimplePie_HTTP_Parser
  • SimplePie_IRI
  • SimplePie_Item
  • SimplePie_Locator
  • SimplePie_Misc
  • SimplePie_Net_IPv6
  • SimplePie_Parse_Date
  • SimplePie_Parser
  • SimplePie_Rating
  • SimplePie_Registry
  • SimplePie_Restriction
  • SimplePie_Sanitize
  • SimplePie_Source
  • SimplePie_XML_Declaration_Parser
  • SMTP
  • tagparse
  • TypeError

Interfaces

  • FOFConfigDomainInterface
  • FOFDatabaseInterface
  • FOFDatabaseQueryLimitable
  • FOFDatabaseQueryPreparable
  • FOFDownloadInterface
  • FOFEncryptAesInterface
  • FOFEncryptRandvalinterface
  • FOFFormField
  • FOFHalRenderInterface
  • FOFPlatformFilesystemInterface
  • FOFPlatformInterface
  • JArchiveExtractable
  • JAssociationExtensionInterface
  • JCacheException
  • JComponentRouterInterface
  • JComponentRouterRulesInterface
  • JController
  • JCryptCipher
  • JCryptPassword
  • JFeedParserNamespace
  • JHttpTransport
  • JLayout
  • JModel
  • JObservableInterface
  • JObserverInterface
  • JObserverUpdaterInterface
  • JSessionHandlerInterface
  • JsonSerializable
  • JUcm
  • JView
  • SimplePie_Cache_Base

Exceptions

  • Error
  • JAccessExceptionNotallowed
  • JCacheExceptionConnecting
  • JCacheExceptionUnsupported
  • JComponentExceptionMissing
  • JDatabaseException
  • JDatabaseExceptionConnecting
  • JDatabaseExceptionExecuting
  • JDatabaseExceptionUnsupported
  • JException
  • JSessionExceptionUnsupported
  • LogException
  • phpmailerException
  • SimplePie_Exception

Constants

  • JERROR_CALLBACK_NOT_CALLABLE
  • JERROR_ILLEGAL_MODE
  • JERROR_ILLEGAL_OPTIONS
  • JREQUEST_ALLOWHTML
  • JREQUEST_ALLOWRAW
  • JREQUEST_NOTRIM
  • JROUTER_MODE_RAW
  • JROUTER_MODE_SEF

Functions

  • __autoload
  • array_column
  • boolval
  • composerRequire205c915b9c7d3e718e7c95793ee67ffe
  • gzopen
  • gzseek
  • gztell
  • hash_equals
  • hash_pbkdf2
  • HTMLFilter
  • jexit
  • jimport
  • json_last_error_msg
  • ldap_escape
  • password_get_info
  • password_hash
  • password_needs_rehash
  • password_verify
  • PHPMailerAutoload
  • random_bytes
  • random_int
  • RandomCompat_intval
  • RandomCompat_strlen
  • RandomCompat_substr
  • tln_body2div
  • tln_casenormalize
  • tln_deent
  • tln_defang
  • tln_findnxreg
  • tln_findnxstr
  • tln_fixatts
  • tln_fixstyle
  • tln_fixurl
  • tln_getnxtag
  • tln_sanitize
  • tln_skipspace
  • tln_tagprint
  • tln_unspace
  • utf8_accents_to_ascii
  • utf8_bad_explain
  • utf8_bad_find
  • utf8_bad_findall
  • utf8_bad_identify
  • utf8_bad_replace
  • utf8_bad_strip
  • utf8_byte_position
  • utf8_compliant
  • utf8_from_unicode
  • utf8_ireplace
  • utf8_is_ascii
  • utf8_is_ascii_ctrl
  • utf8_is_valid
  • utf8_is_word_chars
  • utf8_locate_current_chr
  • utf8_locate_next_chr
  • utf8_ltrim
  • utf8_ord
  • utf8_rtrim
  • utf8_specials_pattern
  • utf8_str_pad
  • utf8_str_split
  • utf8_strcasecmp
  • utf8_strcspn
  • utf8_strip_ascii_ctrl
  • utf8_strip_non_ascii
  • utf8_strip_non_ascii_ctrl
  • utf8_strip_specials
  • utf8_stristr
  • utf8_strlen
  • utf8_strpos
  • utf8_strrev
  • utf8_strrpos
  • utf8_strspn
  • utf8_strtolower
  • utf8_strtoupper
  • utf8_substr
  • utf8_substr_replace
  • utf8_to_unicode
  • utf8_trim
  • utf8_ucfirst
  • utf8_ucwords
  • utf8_ucwords_callback
   1 <?php
   2 /**
   3  * @package     FrameworkOnFramework
   4  * @subpackage  toolbar
   5  * @copyright   Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved.
   6  * @license     GNU General Public License version 2 or later; see LICENSE.txt
   7  */
   8 // Protect from unauthorized access
   9 defined('FOF_INCLUDED') or die;
  10 
  11 /**
  12  * The Toolbar class renders the back-end component title area and the back-
  13  * and front-end toolbars.
  14  *
  15  * @package  FrameworkOnFramework
  16  * @since    1.0
  17  */
  18 class FOFToolbar
  19 {
  20     /** @var array Configuration parameters */
  21     protected $config = array();
  22 
  23     /** @var array Input (e.g. request) variables */
  24     protected $input = array();
  25 
  26     /** @var array Permissions map, see the __construct method for more information */
  27     public $perms = array();
  28 
  29     /** @var array The links to be rendered in the toolbar */
  30     protected $linkbar = array();
  31 
  32     /** @var bool Should I render the submenu in the front-end? */
  33     protected $renderFrontendSubmenu = false;
  34 
  35     /** @var bool Should I render buttons in the front-end? */
  36     protected $renderFrontendButtons = false;
  37 
  38     /**
  39      * Gets an instance of a component's toolbar
  40      *
  41      * @param   string  $option  The name of the component
  42      * @param   array   $config  The configuration array for the component
  43      *
  44      * @return  FOFToolbar  The toolbar instance for the component
  45      */
  46     public static function &getAnInstance($option = null, $config = array())
  47     {
  48         static $instances = array();
  49 
  50         // Make sure $config is an array
  51         if (is_object($config))
  52         {
  53             $config = (array) $config;
  54         }
  55         elseif (!is_array($config))
  56         {
  57             $config = array();
  58         }
  59 
  60         $hash = $option;
  61 
  62         if (!array_key_exists($hash, $instances))
  63         {
  64             if (array_key_exists('input', $config))
  65             {
  66                 if ($config['input'] instanceof FOFInput)
  67                 {
  68                     $input = $config['input'];
  69                 }
  70                 else
  71                 {
  72                     $input = new FOFInput($config['input']);
  73                 }
  74             }
  75             else
  76             {
  77                 $input = new FOFInput;
  78             }
  79 
  80             $config['option'] = !is_null($option) ? $option : $input->getCmd('option', 'com_foobar');
  81             $input->set('option', $config['option']);
  82             $config['input'] = $input;
  83 
  84             $className = ucfirst(str_replace('com_', '', $config['option'])) . 'Toolbar';
  85 
  86             if (!class_exists($className))
  87             {
  88                 $componentPaths = FOFPlatform::getInstance()->getComponentBaseDirs($config['option']);
  89 
  90                 $searchPaths = array(
  91                     $componentPaths['main'],
  92                     $componentPaths['main'] . '/toolbars',
  93                     $componentPaths['alt'],
  94                     $componentPaths['alt'] . '/toolbars'
  95                 );
  96 
  97                 if (array_key_exists('searchpath', $config))
  98                 {
  99                     array_unshift($searchPaths, $config['searchpath']);
 100                 }
 101 
 102                 $filesystem = FOFPlatform::getInstance()->getIntegrationObject('filesystem');
 103 
 104                 $path = $filesystem->pathFind(
 105                         $searchPaths, 'toolbar.php'
 106                 );
 107 
 108                 if ($path)
 109                 {
 110                     require_once $path;
 111                 }
 112             }
 113 
 114             if (!class_exists($className))
 115             {
 116                 $className = 'FOFToolbar';
 117             }
 118 
 119             $instance = new $className($config);
 120 
 121             $instances[$hash] = $instance;
 122         }
 123 
 124         return $instances[$hash];
 125     }
 126 
 127     /**
 128      * Public constructor
 129      *
 130      * @param   array  $config  The configuration array of the component
 131      */
 132     public function __construct($config = array())
 133     {
 134         // Make sure $config is an array
 135         if (is_object($config))
 136         {
 137             $config = (array) $config;
 138         }
 139         elseif (!is_array($config))
 140         {
 141             $config = array();
 142         }
 143 
 144         // Cache the config
 145         $this->config = $config;
 146 
 147         // Get the input for this MVC triad
 148         if (array_key_exists('input', $config))
 149         {
 150             $this->input = $config['input'];
 151         }
 152         else
 153         {
 154             $this->input = new FOFInput;
 155         }
 156 
 157         // Get the default values for the component and view names
 158         $this->component = $this->input->getCmd('option', 'com_foobar');
 159 
 160         // Overrides from the config
 161 
 162         if (array_key_exists('option', $config))
 163         {
 164             $this->component = $config['option'];
 165         }
 166 
 167         $this->input->set('option', $this->component);
 168 
 169         // Get default permissions (can be overriden by the view)
 170         $platform = FOFPlatform::getInstance();
 171         $perms = (object) array(
 172                 'manage'     => $platform->authorise('core.manage', $this->input->getCmd('option', 'com_foobar')),
 173                 'create'     => $platform->authorise('core.create', $this->input->getCmd('option', 'com_foobar')),
 174                 'edit'       => $platform->authorise('core.edit', $this->input->getCmd('option', 'com_foobar')),
 175                 'editstate'  => $platform->authorise('core.edit.state', $this->input->getCmd('option', 'com_foobar')),
 176                 'delete'     => $platform->authorise('core.delete', $this->input->getCmd('option', 'com_foobar')),
 177         );
 178 
 179         // Save front-end toolbar and submenu rendering flags if present in the config
 180         if (array_key_exists('renderFrontendButtons', $config))
 181         {
 182             $this->renderFrontendButtons = $config['renderFrontendButtons'];
 183         }
 184 
 185         if (array_key_exists('renderFrontendSubmenu', $config))
 186         {
 187             $this->renderFrontendSubmenu = $config['renderFrontendSubmenu'];
 188         }
 189 
 190         // If not in the administrative area, load the JToolbarHelper
 191         if (!FOFPlatform::getInstance()->isBackend())
 192         {
 193             // Needed for tests, so we can inject our "special" helper class
 194             if(!class_exists('JToolbarHelper'))
 195             {
 196                 $platformDirs = FOFPlatform::getInstance()->getPlatformBaseDirs();
 197                 require_once $platformDirs['root'] . '/administrator/includes/toolbar.php';
 198             }
 199 
 200             // Things to do if we have to render a front-end toolbar
 201             if ($this->renderFrontendButtons)
 202             {
 203                 // Load back-end toolbar language files in front-end
 204                 FOFPlatform::getInstance()->loadTranslations('');
 205 
 206                 // Needed for tests (we can fake we're not in the backend, but we are still in CLI!)
 207                 if(!FOFPlatform::getInstance()->isCli())
 208                 {
 209                     // Load the core Javascript
 210                     if (version_compare(JVERSION, '3.0', 'ge'))
 211                     {
 212                         JHtml::_('jquery.framework');
 213 
 214                         if (version_compare(JVERSION, '3.3.0', 'ge'))
 215                         {
 216                             JHtml::_('behavior.core');
 217                         }
 218                         else
 219                         {
 220                             JHtml::_('behavior.framework', true);
 221                         }
 222                     }
 223                     else
 224                     {
 225                         JHtml::_('behavior.framework');
 226                     }
 227                 }
 228             }
 229         }
 230 
 231         // Store permissions in the local toolbar object
 232         $this->perms = $perms;
 233     }
 234 
 235     /**
 236      * Renders the toolbar for the current view and task
 237      *
 238      * @param   string    $view   The view of the component
 239      * @param   string    $task   The exact task of the view
 240      * @param   FOFInput  $input  An optional input object used to determine the defaults
 241      *
 242      * @return  void
 243      */
 244     public function renderToolbar($view = null, $task = null, $input = null)
 245     {
 246         if (!empty($input))
 247         {
 248             $saveInput = $this->input;
 249             $this->input = $input;
 250         }
 251 
 252         // If tmpl=component the default behaviour is to not render the toolbar
 253         if ($this->input->getCmd('tmpl', '') == 'component')
 254         {
 255             $render_toolbar = false;
 256         }
 257         else
 258         {
 259             $render_toolbar = true;
 260         }
 261 
 262         // If there is a render_toolbar=0 in the URL, do not render a toolbar
 263 
 264         $render_toolbar = $this->input->getBool('render_toolbar', $render_toolbar);
 265 
 266         if (!$render_toolbar)
 267         {
 268             return;
 269         }
 270 
 271         // Get the view and task
 272 
 273         if (empty($view))
 274         {
 275             $view = $this->input->getCmd('view', 'cpanel');
 276         }
 277 
 278         if (empty($task))
 279         {
 280             $task = $this->input->getCmd('task', 'default');
 281         }
 282 
 283         $this->view = $view;
 284         $this->task = $task;
 285         $view = FOFInflector::pluralize($view);
 286         $component = $this->input->get('option', 'com_foobar', 'cmd');
 287 
 288         $configProvider = new FOFConfigProvider;
 289         $toolbar = $configProvider->get(
 290             $component . '.views.' . $view . '.toolbar.' . $task
 291         );
 292 
 293         // If we have a toolbar config specified
 294         if (!empty($toolbar))
 295         {
 296             return $this->renderFromConfig($toolbar);
 297         }
 298 
 299         // Check for an onViewTask method
 300         $methodName = 'on' . ucfirst($view) . ucfirst($task);
 301 
 302         if (method_exists($this, $methodName))
 303         {
 304             return $this->$methodName();
 305         }
 306 
 307         // Check for an onView method
 308         $methodName = 'on' . ucfirst($view);
 309 
 310         if (method_exists($this, $methodName))
 311         {
 312             return $this->$methodName();
 313         }
 314 
 315         // Check for an onTask method
 316         $methodName = 'on' . ucfirst($task);
 317 
 318         if (method_exists($this, $methodName))
 319         {
 320             return $this->$methodName();
 321         }
 322 
 323         if (!empty($input))
 324         {
 325             $this->input = $saveInput;
 326         }
 327     }
 328 
 329     /**
 330      * Renders the toolbar for the component's Control Panel page
 331      *
 332      * @return  void
 333      */
 334     public function onCpanelsBrowse()
 335     {
 336         if (FOFPlatform::getInstance()->isBackend() || $this->renderFrontendSubmenu)
 337         {
 338             $this->renderSubmenu();
 339         }
 340 
 341         if (!FOFPlatform::getInstance()->isBackend() && !$this->renderFrontendButtons)
 342         {
 343             return;
 344         }
 345 
 346         $option = $this->input->getCmd('option', 'com_foobar');
 347 
 348         JToolbarHelper::title(JText::_(strtoupper($option)), str_replace('com_', '', $option));
 349         JToolbarHelper::preferences($option, 550, 875);
 350     }
 351 
 352     /**
 353      * Renders the toolbar for the component's Browse pages (the plural views)
 354      *
 355      * @return  void
 356      */
 357     public function onBrowse()
 358     {
 359         // On frontend, buttons must be added specifically
 360         if (FOFPlatform::getInstance()->isBackend() || $this->renderFrontendSubmenu)
 361         {
 362             $this->renderSubmenu();
 363         }
 364 
 365         if (!FOFPlatform::getInstance()->isBackend() && !$this->renderFrontendButtons)
 366         {
 367             return;
 368         }
 369 
 370         // Set toolbar title
 371         $option = $this->input->getCmd('option', 'com_foobar');
 372         $subtitle_key = strtoupper($option . '_TITLE_' . $this->input->getCmd('view', 'cpanel'));
 373         JToolbarHelper::title(JText::_(strtoupper($option)) . ': ' . JText::_($subtitle_key), str_replace('com_', '', $option));
 374 
 375         // Add toolbar buttons
 376         if ($this->perms->create)
 377         {
 378             if (version_compare(JVERSION, '3.0', 'ge'))
 379             {
 380                 JToolbarHelper::addNew();
 381             }
 382             else
 383             {
 384                 JToolbarHelper::addNewX();
 385             }
 386         }
 387 
 388         if ($this->perms->edit)
 389         {
 390             if (version_compare(JVERSION, '3.0', 'ge'))
 391             {
 392                 JToolbarHelper::editList();
 393             }
 394             else
 395             {
 396                 JToolbarHelper::editListX();
 397             }
 398         }
 399 
 400         if ($this->perms->create || $this->perms->edit)
 401         {
 402             JToolbarHelper::divider();
 403         }
 404 
 405         if ($this->perms->editstate)
 406         {
 407             JToolbarHelper::publishList();
 408             JToolbarHelper::unpublishList();
 409             JToolbarHelper::divider();
 410         }
 411 
 412         if ($this->perms->delete)
 413         {
 414             $msg = JText::_($this->input->getCmd('option', 'com_foobar') . '_CONFIRM_DELETE');
 415             JToolbarHelper::deleteList(strtoupper($msg));
 416         }
 417     }
 418 
 419     /**
 420      * Renders the toolbar for the component's Read pages
 421      *
 422      * @return  void
 423      */
 424     public function onRead()
 425     {
 426         // On frontend, buttons must be added specifically
 427         if (FOFPlatform::getInstance()->isBackend() || $this->renderFrontendSubmenu)
 428         {
 429             $this->renderSubmenu();
 430         }
 431 
 432         if (!FOFPlatform::getInstance()->isBackend() && !$this->renderFrontendButtons)
 433         {
 434             return;
 435         }
 436 
 437         $option = $this->input->getCmd('option', 'com_foobar');
 438         $componentName = str_replace('com_', '', $option);
 439 
 440         // Set toolbar title
 441         $subtitle_key = strtoupper($option . '_TITLE_' . $this->input->getCmd('view', 'cpanel') . '_READ');
 442         JToolbarHelper::title(JText::_(strtoupper($option)) . ': ' . JText::_($subtitle_key), $componentName);
 443 
 444         // Set toolbar icons
 445         JToolbarHelper::back();
 446     }
 447 
 448     /**
 449      * Renders the toolbar for the component's Add pages
 450      *
 451      * @return  void
 452      */
 453     public function onAdd()
 454     {
 455         // On frontend, buttons must be added specifically
 456         if (!FOFPlatform::getInstance()->isBackend() && !$this->renderFrontendButtons)
 457         {
 458             return;
 459         }
 460 
 461         $option = $this->input->getCmd('option', 'com_foobar');
 462         $componentName = str_replace('com_', '', $option);
 463 
 464         // Set toolbar title
 465         $subtitle_key = strtoupper($option . '_TITLE_' . FOFInflector::pluralize($this->input->getCmd('view', 'cpanel'))) . '_EDIT';
 466         JToolbarHelper::title(JText::_(strtoupper($option)) . ': ' . JText::_($subtitle_key), $componentName);
 467 
 468         // Set toolbar icons
 469         if ($this->perms->edit || $this->perms->editown)
 470         {
 471             // Show the apply button only if I can edit the record, otherwise I'll return to the edit form and get a
 472             // 403 error since I can't do that
 473             JToolbarHelper::apply();
 474         }
 475 
 476         JToolbarHelper::save();
 477 
 478         if ($this->perms->create)
 479         {
 480             JToolbarHelper::custom('savenew', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
 481         }
 482 
 483         JToolbarHelper::cancel();
 484     }
 485 
 486     /**
 487      * Renders the toolbar for the component's Edit pages
 488      *
 489      * @return  void
 490      */
 491     public function onEdit()
 492     {
 493         // On frontend, buttons must be added specifically
 494         if (!FOFPlatform::getInstance()->isBackend() && !$this->renderFrontendButtons)
 495         {
 496             return;
 497         }
 498 
 499         $this->onAdd();
 500     }
 501 
 502     /**
 503      * Removes all links from the link bar
 504      *
 505      * @return  void
 506      */
 507     public function clearLinks()
 508     {
 509         $this->linkbar = array();
 510     }
 511 
 512     /**
 513      * Get the link bar's link definitions
 514      *
 515      * @return  array
 516      */
 517     public function &getLinks()
 518     {
 519         return $this->linkbar;
 520     }
 521 
 522     /**
 523      * Append a link to the link bar
 524      *
 525      * @param   string       $name    The text of the link
 526      * @param   string|null  $link    The link to render; set to null to render a separator
 527      * @param   boolean      $active  True if it's an active link
 528      * @param   string|null  $icon    Icon class (used by some renderers, like the Bootstrap renderer)
 529      * @param   string|null  $parent  The parent element (referenced by name)) Thsi will create a dropdown list
 530      *
 531      * @return  void
 532      */
 533     public function appendLink($name, $link = null, $active = false, $icon = null, $parent = '')
 534     {
 535         $linkDefinition = array(
 536             'name'   => $name,
 537             'link'   => $link,
 538             'active' => $active,
 539             'icon'   => $icon
 540         );
 541 
 542         if (empty($parent))
 543         {
 544             if(array_key_exists($name, $this->linkbar))
 545             {
 546                 $this->linkbar[$name] = array_merge($this->linkbar[$name], $linkDefinition);
 547 
 548                 // If there already are some children, I have to put this view link in the "items" array in the first place
 549                 if(array_key_exists('items', $this->linkbar[$name]))
 550                 {
 551                     array_unshift($this->linkbar[$name]['items'], $linkDefinition);
 552                 }
 553             }
 554             else
 555             {
 556                 $this->linkbar[$name] = $linkDefinition;
 557             }
 558         }
 559         else
 560         {
 561             if (!array_key_exists($parent, $this->linkbar))
 562             {
 563                 $parentElement = $linkDefinition;
 564                 $parentElement['name'] = $parent;
 565                 $parentElement['link'] = null;
 566                 $this->linkbar[$parent] = $parentElement;
 567                 $parentElement['items'] = array();
 568             }
 569             else
 570             {
 571                 $parentElement = $this->linkbar[$parent];
 572 
 573                 if (!array_key_exists('dropdown', $parentElement) && !empty($parentElement['link']))
 574                 {
 575                     $newSubElement = $parentElement;
 576                     $parentElement['items'] = array($newSubElement);
 577                 }
 578             }
 579 
 580             $parentElement['items'][] = $linkDefinition;
 581             $parentElement['dropdown'] = true;
 582 
 583             if($active)
 584             {
 585                 $parentElement['active'] = true;
 586             }
 587 
 588             $this->linkbar[$parent] = $parentElement;
 589         }
 590     }
 591 
 592     /**
 593      * Prefixes (some people erroneously call this "prepend" – there is no such word) a link to the link bar
 594      *
 595      * @param   string       $name    The text of the link
 596      * @param   string|null  $link    The link to render; set to null to render a separator
 597      * @param   boolean      $active  True if it's an active link
 598      * @param   string|null  $icon    Icon class (used by some renderers, like the Bootstrap renderer)
 599      *
 600      * @return  void
 601      */
 602     public function prefixLink($name, $link = null, $active = false, $icon = null)
 603     {
 604         $linkDefinition = array(
 605             'name'   => $name,
 606             'link'   => $link,
 607             'active' => $active,
 608             'icon'   => $icon
 609         );
 610         array_unshift($this->linkbar, $linkDefinition);
 611     }
 612 
 613     /**
 614      * Renders the submenu (toolbar links) for all detected views of this component
 615      *
 616      * @return  void
 617      */
 618     public function renderSubmenu()
 619     {
 620         $views = $this->getMyViews();
 621 
 622         if (empty($views))
 623         {
 624             return;
 625         }
 626 
 627         $activeView = $this->input->getCmd('view', 'cpanel');
 628 
 629         foreach ($views as $view)
 630         {
 631             // Get the view name
 632             $key = strtoupper($this->component) . '_TITLE_' . strtoupper($view);
 633 
 634             //Do we have a translation for this key?
 635             if (strtoupper(JText::_($key)) == $key)
 636             {
 637                 $altview = FOFInflector::isPlural($view) ? FOFInflector::singularize($view) : FOFInflector::pluralize($view);
 638                 $key2 = strtoupper($this->component) . '_TITLE_' . strtoupper($altview);
 639 
 640                 // Maybe we have for the alternative view?
 641                 if (strtoupper(JText::_($key2)) == $key2)
 642                 {
 643                     // Nope, let's use the raw name
 644                     $name = ucfirst($view);
 645                 }
 646                 else
 647                 {
 648                     $name = JText::_($key2);
 649                 }
 650             }
 651             else
 652             {
 653                 $name = JText::_($key);
 654             }
 655 
 656             $link = 'index.php?option=' . $this->component . '&view=' . $view;
 657 
 658             $active = $view == $activeView;
 659 
 660             $this->appendLink($name, $link, $active);
 661         }
 662     }
 663 
 664     /**
 665      * Automatically detects all views of the component
 666      *
 667      * @return  array  A list of all views, in the order to be displayed in the toolbar submenu
 668      */
 669     protected function getMyViews()
 670     {
 671         $views      = array();
 672         $t_views    = array();
 673         $using_meta = false;
 674 
 675         $componentPaths = FOFPlatform::getInstance()->getComponentBaseDirs($this->component);
 676         $searchPath     = $componentPaths['main'] . '/views';
 677         $filesystem     = FOFPlatform::getInstance()->getIntegrationObject('filesystem');
 678 
 679         $allFolders = $filesystem->folderFolders($searchPath);
 680 
 681         if (!empty($allFolders))
 682         {
 683             foreach ($allFolders as $folder)
 684             {
 685                 $view = $folder;
 686 
 687                 // View already added
 688                 if (in_array(FOFInflector::pluralize($view), $t_views))
 689                 {
 690                     continue;
 691                 }
 692 
 693                 // Do we have a 'skip.xml' file in there?
 694                 $files = $filesystem->folderFiles($searchPath . '/' . $view, '^skip\.xml$');
 695 
 696                 if (!empty($files))
 697                 {
 698                     continue;
 699                 }
 700 
 701                 // Do we have extra information about this view? (ie. ordering)
 702                 $meta = $filesystem->folderFiles($searchPath . '/' . $view, '^metadata\.xml$');
 703 
 704                 // Not found, do we have it inside the plural one?
 705                 if (!$meta)
 706                 {
 707                     $plural = FOFInflector::pluralize($view);
 708 
 709                     if (in_array($plural, $allFolders))
 710                     {
 711                         $view = $plural;
 712                         $meta = $filesystem->folderFiles($searchPath . '/' . $view, '^metadata\.xml$');
 713                     }
 714                 }
 715 
 716                 if (!empty($meta))
 717                 {
 718                     $using_meta = true;
 719                     $xml = simplexml_load_file($searchPath . '/' . $view . '/' . $meta[0]);
 720                     $order = (int) $xml->foflib->ordering;
 721                 }
 722                 else
 723                 {
 724                     // Next place. It's ok since the index are 0-based and count is 1-based
 725 
 726                     if (!isset($to_order))
 727                     {
 728                         $to_order = array();
 729                     }
 730 
 731                     $order = count($to_order);
 732                 }
 733 
 734                 $view = FOFInflector::pluralize($view);
 735 
 736                 $t_view = new stdClass;
 737                 $t_view->ordering = $order;
 738                 $t_view->view = $view;
 739 
 740                 $to_order[] = $t_view;
 741                 $t_views[] = $view;
 742             }
 743         }
 744 
 745         FOFUtilsArray::sortObjects($to_order, 'ordering');
 746         $views = FOFUtilsArray::getColumn($to_order, 'view');
 747 
 748         // If not using the metadata file, let's put the cpanel view on top
 749         if (!$using_meta)
 750         {
 751             $cpanel = array_search('cpanels', $views);
 752 
 753             if ($cpanel !== false)
 754             {
 755                 unset($views[$cpanel]);
 756                 array_unshift($views, 'cpanels');
 757             }
 758         }
 759 
 760         return $views;
 761     }
 762 
 763     /**
 764      * Return the front-end toolbar rendering flag
 765      *
 766      * @return  boolean
 767      */
 768     public function getRenderFrontendButtons()
 769     {
 770         return $this->renderFrontendButtons;
 771     }
 772 
 773     /**
 774      * Return the front-end submenu rendering flag
 775      *
 776      * @return  boolean
 777      */
 778     public function getRenderFrontendSubmenu()
 779     {
 780         return $this->renderFrontendSubmenu;
 781     }
 782 
 783     /**
 784      * Render the toolbar from the configuration.
 785      *
 786      * @param   array  $toolbar  The toolbar definition
 787      *
 788      * @return  void
 789      */
 790     private function renderFromConfig(array $toolbar)
 791     {
 792         if (FOFPlatform::getInstance()->isBackend() || $this->renderFrontendSubmenu)
 793         {
 794             $this->renderSubmenu();
 795         }
 796 
 797         if (!FOFPlatform::getInstance()->isBackend() && !$this->renderFrontendButtons)
 798         {
 799             return;
 800         }
 801 
 802         // Render each element
 803         foreach ($toolbar as $elementType => $elementAttributes)
 804         {
 805             $value = isset($elementAttributes['value']) ? $elementAttributes['value'] : null;
 806             $this->renderToolbarElement($elementType, $value, $elementAttributes);
 807         }
 808 
 809         return;
 810     }
 811 
 812     /**
 813      * Render a toolbar element.
 814      *
 815      * @param   string  $type        The element type.
 816      * @param   mixed   $value       The element value.
 817      * @param   array   $attributes  The element attributes.
 818      *
 819      * @return  void
 820      *
 821      * @codeCoverageIgnore
 822      * @throws  InvalidArgumentException
 823      */
 824     private function renderToolbarElement($type, $value = null, array $attributes = array())
 825     {
 826         switch ($type)
 827         {
 828             case 'title':
 829                 $icon = isset($attributes['icon']) ? $attributes['icon'] : 'generic.png';
 830                 JToolbarHelper::title($value, $icon);
 831                 break;
 832 
 833             case 'divider':
 834                 JToolbarHelper::divider();
 835                 break;
 836 
 837             case 'custom':
 838                 $task = isset($attributes['task']) ? $attributes['task'] : '';
 839                 $icon = isset($attributes['icon']) ? $attributes['icon'] : '';
 840                 $iconOver = isset($attributes['icon_over']) ? $attributes['icon_over'] : '';
 841                 $alt = isset($attributes['alt']) ? $attributes['alt'] : '';
 842                 $listSelect = isset($attributes['list_select']) ?
 843                     FOFStringUtils::toBool($attributes['list_select']) : true;
 844 
 845                 JToolbarHelper::custom($task, $icon, $iconOver, $alt, $listSelect);
 846                 break;
 847 
 848             case 'preview':
 849                 $url = isset($attributes['url']) ? $attributes['url'] : '';
 850                 $update_editors = isset($attributes['update_editors']) ?
 851                     FOFStringUtils::toBool($attributes['update_editors']) : false;
 852 
 853                 JToolbarHelper::preview($url, $update_editors);
 854                 break;
 855 
 856             case 'help':
 857                 if (!isset($attributes['help']))
 858                 {
 859                     throw new InvalidArgumentException(
 860                         'The help attribute is missing in the help button type.'
 861                     );
 862                 }
 863 
 864                 $ref = $attributes['help'];
 865                 $com = isset($attributes['com']) ? FOFStringUtils::toBool($attributes['com']) : false;
 866                 $override = isset($attributes['override']) ? $attributes['override'] : null;
 867                 $component = isset($attributes['component']) ? $attributes['component'] : null;
 868 
 869                 JToolbarHelper::help($ref, $com, $override, $component);
 870                 break;
 871 
 872             case 'back':
 873                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_BACK';
 874                 $href = isset($attributes['href']) ? $attributes['href'] : 'javascript:history.back();';
 875 
 876                 JToolbarHelper::back($alt, $href);
 877                 break;
 878 
 879             case 'media_manager':
 880                 $directory = isset($attributes['directory']) ? $attributes['directory'] : '';
 881                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_UPLOAD';
 882 
 883                 JToolbarHelper::media_manager($directory, $alt);
 884                 break;
 885 
 886             case 'assign':
 887                 $task = isset($attributes['task']) ? $attributes['task'] : 'assign';
 888                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_ASSIGN';
 889 
 890                 JToolbarHelper::assign($task, $alt);
 891                 break;
 892 
 893             case 'new':
 894                 if ($this->perms->create)
 895                 {
 896                     $task = isset($attributes['task']) ? $attributes['task'] : 'add';
 897                     $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_NEW';
 898                     $check = isset($attributes['check']) ?
 899                         FOFStringUtils::toBool($attributes['check']) : false;
 900 
 901                     JToolbarHelper::addNew($task, $alt, $check);
 902                 }
 903 
 904                 break;
 905 
 906             case 'publish':
 907                 if ($this->perms->editstate)
 908                 {
 909                     $task = isset($attributes['task']) ? $attributes['task'] : 'publish';
 910                     $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_PUBLISH';
 911                     $check = isset($attributes['check']) ?
 912                         FOFStringUtils::toBool($attributes['check']) : false;
 913 
 914                     JToolbarHelper::publish($task, $alt, $check);
 915                 }
 916 
 917                 break;
 918 
 919             case 'publishList':
 920                 if ($this->perms->editstate)
 921                 {
 922                     $task = isset($attributes['task']) ? $attributes['task'] : 'publish';
 923                     $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_PUBLISH';
 924 
 925                     JToolbarHelper::publishList($task, $alt);
 926                 }
 927 
 928                 break;
 929 
 930             case 'unpublish':
 931                 if ($this->perms->editstate)
 932                 {
 933                     $task = isset($attributes['task']) ? $attributes['task'] : 'unpublish';
 934                     $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_UNPUBLISH';
 935                     $check = isset($attributes['check']) ?
 936                         FOFStringUtils::toBool($attributes['check']) : false;
 937 
 938                     JToolbarHelper::unpublish($task, $alt, $check);
 939                 }
 940 
 941                 break;
 942 
 943             case 'unpublishList':
 944                 if ($this->perms->editstate)
 945                 {
 946                     $task = isset($attributes['task']) ? $attributes['task'] : 'unpublish';
 947                     $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_UNPUBLISH';
 948 
 949                     JToolbarHelper::unpublishList($task, $alt);
 950                 }
 951 
 952                 break;
 953 
 954             case 'archiveList':
 955                 if ($this->perms->editstate)
 956                 {
 957                     $task = isset($attributes['task']) ? $attributes['task'] : 'archive';
 958                     $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_ARCHIVE';
 959 
 960                     JToolbarHelper::archiveList($task, $alt);
 961                 }
 962 
 963                 break;
 964 
 965             case 'unarchiveList':
 966                 if ($this->perms->editstate)
 967                 {
 968                     $task = isset($attributes['task']) ? $attributes['task'] : 'unarchive';
 969                     $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_UNARCHIVE';
 970 
 971                     JToolbarHelper::unarchiveList($task, $alt);
 972                 }
 973 
 974                 break;
 975 
 976             case 'editList':
 977                 if ($this->perms->edit)
 978                 {
 979                     $task = isset($attributes['task']) ? $attributes['task'] : 'edit';
 980                     $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_EDIT';
 981 
 982                     JToolbarHelper::editList($task, $alt);
 983                 }
 984 
 985                 break;
 986 
 987             case 'editHtml':
 988                 $task = isset($attributes['task']) ? $attributes['task'] : 'edit_source';
 989                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_EDIT_HTML';
 990 
 991                 JToolbarHelper::editHtml($task, $alt);
 992                 break;
 993 
 994             case 'editCss':
 995                 $task = isset($attributes['task']) ? $attributes['task'] : 'edit_css';
 996                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_EDIT_CSS';
 997 
 998                 JToolbarHelper::editCss($task, $alt);
 999                 break;
1000 
1001             case 'deleteList':
1002                 if ($this->perms->delete)
1003                 {
1004                     $msg = isset($attributes['msg']) ? $attributes['msg'] : '';
1005                     $task = isset($attributes['task']) ? $attributes['task'] : 'remove';
1006                     $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_DELETE';
1007 
1008                     JToolbarHelper::deleteList($msg, $task, $alt);
1009                 }
1010 
1011                 break;
1012 
1013             case 'trash':
1014                 if ($this->perms->editstate)
1015                 {
1016                     $task = isset($attributes['task']) ? $attributes['task'] : 'remove';
1017                     $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_TRASH';
1018                     $check = isset($attributes['check']) ?
1019                         FOFStringUtils::toBool($attributes['check']) : true;
1020 
1021                     JToolbarHelper::trash($task, $alt, $check);
1022                 }
1023 
1024                 break;
1025 
1026             case 'apply':
1027                 $task = isset($attributes['task']) ? $attributes['task'] : 'apply';
1028                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_APPLY';
1029 
1030                 JToolbarHelper::apply($task, $alt);
1031                 break;
1032 
1033             case 'save':
1034                 $task = isset($attributes['task']) ? $attributes['task'] : 'save';
1035                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_SAVE';
1036 
1037                 JToolbarHelper::save($task, $alt);
1038                 break;
1039 
1040             case 'save2new':
1041                 $task = isset($attributes['task']) ? $attributes['task'] : 'save2new';
1042                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_SAVE_AND_NEW';
1043 
1044                 JToolbarHelper::save2new($task, $alt);
1045                 break;
1046 
1047             case 'save2copy':
1048                 $task = isset($attributes['task']) ? $attributes['task'] : 'save2copy';
1049                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_SAVE_AS_COPY';
1050                 JToolbarHelper::save2copy($task, $alt);
1051                 break;
1052 
1053             case 'checkin':
1054                 $task = isset($attributes['task']) ? $attributes['task'] : 'checkin';
1055                 $alt = isset($attributes['alt']) ? $attributes['alt'] :'JTOOLBAR_CHECKIN';
1056                 $check = isset($attributes['check']) ?
1057                     FOFStringUtils::toBool($attributes['check']) : true;
1058 
1059                 JToolbarHelper::checkin($task, $alt, $check);
1060                 break;
1061 
1062             case 'cancel':
1063                 $task = isset($attributes['task']) ? $attributes['task'] : 'cancel';
1064                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_CANCEL';
1065 
1066                 JToolbarHelper::cancel($task, $alt);
1067                 break;
1068 
1069             case 'preferences':
1070                 if (!isset($attributes['component']))
1071                 {
1072                     throw new InvalidArgumentException(
1073                         'The component attribute is missing in the preferences button type.'
1074                     );
1075                 }
1076 
1077                 $component = $attributes['component'];
1078                 $height = isset($attributes['height']) ? $attributes['height'] : '550';
1079                 $width = isset($attributes['width']) ? $attributes['width'] : '875';
1080                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JToolbar_Options';
1081                 $path = isset($attributes['path']) ? $attributes['path'] : '';
1082 
1083                 JToolbarHelper::preferences($component, $height, $width, $alt, $path);
1084                 break;
1085 
1086             default:
1087                 throw new InvalidArgumentException(sprintf('Unknown button type %s', $type));
1088         }
1089     }
1090 }
1091 
Joomla! Framework TM API documentation generated by ApiGen 2.8.0
Joomla!® and Joomla! Framework™ are trademarks of Open Source Matters, Inc. in the United States and other countries.