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  render
   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 defined('FOF_INCLUDED') or die;
   9 
  10 /**
  11  * Akeeba Strapper view renderer class.
  12  *
  13  * @package  FrameworkOnFramework
  14  * @since    2.0
  15  */
  16 class FOFRenderStrapper extends FOFRenderAbstract
  17 {
  18     /**
  19      * Public constructor. Determines the priority of this class and if it should be enabled
  20      */
  21     public function __construct()
  22     {
  23         $this->priority  = 60;
  24         $this->enabled   = class_exists('AkeebaStrapper');
  25     }
  26 
  27     /**
  28      * Echoes any HTML to show before the view template
  29      *
  30      * @param   string    $view    The current view
  31      * @param   string    $task    The current task
  32      * @param   FOFInput  $input   The input array (request parameters)
  33      * @param   array     $config  The view configuration array
  34      *
  35      * @return  void
  36      */
  37     public function preRender($view, $task, $input, $config = array())
  38     {
  39         $format  = $input->getCmd('format', 'html');
  40 
  41         if (empty($format))
  42         {
  43             $format  = 'html';
  44         }
  45 
  46         if ($format != 'html')
  47         {
  48             return;
  49         }
  50 
  51         $platform = FOFPlatform::getInstance();
  52 
  53         if ($platform->isCli())
  54         {
  55             return;
  56         }
  57 
  58         if (version_compare(JVERSION, '3.0.0', 'lt'))
  59         {
  60             JHtml::_('behavior.framework');
  61         }
  62         else
  63         {
  64             if (version_compare(JVERSION, '3.3.0', 'ge'))
  65             {
  66                 JHtml::_('behavior.core');
  67             }
  68             else
  69             {
  70                 JHtml::_('behavior.framework', true);
  71             }
  72 
  73             JHtml::_('jquery.framework');
  74         }
  75 
  76         // Wrap output in various classes
  77         $version = new JVersion;
  78         $versionParts = explode('.', $version->RELEASE);
  79         $minorVersion = str_replace('.', '', $version->RELEASE);
  80         $majorVersion = array_shift($versionParts);
  81 
  82         if ($platform->isBackend())
  83         {
  84             $area = $platform->isBackend() ? 'admin' : 'site';
  85             $option = $input->getCmd('option', '');
  86             $view = $input->getCmd('view', '');
  87             $layout = $input->getCmd('layout', '');
  88             $task = $input->getCmd('task', '');
  89 
  90             $classes = array(
  91                 'joomla-version-' . $majorVersion,
  92                 'joomla-version-' . $minorVersion,
  93                 $area,
  94                 $option,
  95                 'view-' . $view,
  96                 'layout-' . $layout,
  97                 'task-' . $task,
  98                 // We have a floating sidebar, they said. It looks great, they said. They must've been blind, I say!
  99                 'j-toggle-main',
 100                 'j-toggle-transition',
 101                 'span12',
 102             );
 103         }
 104         elseif ($platform->isFrontend())
 105         {
 106             // @TODO: Remove the frontend Joomla! version classes in FOF 3
 107             $classes = array(
 108                 'joomla-version-' . $majorVersion,
 109                 'joomla-version-' . $minorVersion,
 110             );
 111         }
 112 
 113         // Wrap output in divs
 114         echo '<div id="akeeba-bootstrap" class="' . implode($classes, ' ') . "\">\n";
 115         echo "<div class=\"akeeba-bootstrap\">\n";
 116         echo "<div class=\"row-fluid\">\n";
 117 
 118         // Render submenu and toolbar (only if asked to)
 119         if ($input->getBool('render_toolbar', true))
 120         {
 121             $this->renderButtons($view, $task, $input, $config);
 122             $this->renderLinkbar($view, $task, $input, $config);
 123         }
 124     }
 125 
 126     /**
 127      * Echoes any HTML to show after the view template
 128      *
 129      * @param   string    $view    The current view
 130      * @param   string    $task    The current task
 131      * @param   FOFInput  $input   The input array (request parameters)
 132      * @param   array     $config  The view configuration array
 133      *
 134      * @return  void
 135      */
 136     public function postRender($view, $task, $input, $config = array())
 137     {
 138         $format = $input->getCmd('format', 'html');
 139 
 140         if ($format != 'html' || FOFPlatform::getInstance()->isCli())
 141         {
 142             return;
 143         }
 144 
 145         if (!FOFPlatform::getInstance()->isCli() && version_compare(JVERSION, '3.0', 'ge'))
 146         {
 147             $sidebarEntries = JHtmlSidebar::getEntries();
 148 
 149             if (!empty($sidebarEntries))
 150             {
 151                 echo '</div>';
 152             }
 153         }
 154 
 155         echo "</div>\n";    // Closes row-fluid div
 156         echo "</div>\n";    // Closes akeeba-bootstrap div
 157         echo "</div>\n";    // Closes joomla-version div
 158     }
 159 
 160     /**
 161      * Loads the validation script for an edit form
 162      *
 163      * @param   FOFForm  &$form  The form we are rendering
 164      *
 165      * @return  void
 166      */
 167     protected function loadValidationScript(FOFForm &$form)
 168     {
 169         $message = $form->getView()->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));
 170 
 171         $js = <<<JS
 172 Joomla.submitbutton = function(task)
 173 {
 174     if (task == 'cancel' || document.formvalidator.isValid(document.id('adminForm')))
 175     {
 176         Joomla.submitform(task, document.getElementById('adminForm'));
 177     }
 178     else {
 179         alert('$message');
 180     }
 181 };
 182 JS;
 183 
 184         $document = FOFPlatform::getInstance()->getDocument();
 185 
 186         if ($document instanceof JDocument)
 187         {
 188             $document->addScriptDeclaration($js);
 189         }
 190     }
 191 
 192     /**
 193      * Renders the submenu (link bar)
 194      *
 195      * @param   string    $view    The active view name
 196      * @param   string    $task    The current task
 197      * @param   FOFInput  $input   The input object
 198      * @param   array     $config  Extra configuration variables for the toolbar
 199      *
 200      * @return  void
 201      */
 202     protected function renderLinkbar($view, $task, $input, $config = array())
 203     {
 204         $style = 'classic';
 205 
 206         if (array_key_exists('linkbar_style', $config))
 207         {
 208             $style = $config['linkbar_style'];
 209         }
 210 
 211         if (!version_compare(JVERSION, '3.0', 'ge'))
 212         {
 213             $style = 'classic';
 214         }
 215 
 216         switch ($style)
 217         {
 218             case 'joomla':
 219                 $this->renderLinkbar_joomla($view, $task, $input);
 220                 break;
 221 
 222             case 'classic':
 223             default:
 224                 $this->renderLinkbar_classic($view, $task, $input);
 225                 break;
 226         }
 227     }
 228 
 229     /**
 230      * Renders the submenu (link bar) in FOF's classic style, using a Bootstrapped
 231      * tab bar.
 232      *
 233      * @param   string    $view    The active view name
 234      * @param   string    $task    The current task
 235      * @param   FOFInput  $input   The input object
 236      * @param   array     $config  Extra configuration variables for the toolbar
 237      *
 238      * @return  void
 239      */
 240     protected function renderLinkbar_classic($view, $task, $input, $config = array())
 241     {
 242         if (FOFPlatform::getInstance()->isCli())
 243         {
 244             return;
 245         }
 246 
 247         // Do not render a submenu unless we are in the the admin area
 248         $toolbar                 = FOFToolbar::getAnInstance($input->getCmd('option', 'com_foobar'), $config);
 249         $renderFrontendSubmenu   = $toolbar->getRenderFrontendSubmenu();
 250 
 251         if (!FOFPlatform::getInstance()->isBackend() && !$renderFrontendSubmenu)
 252         {
 253             return;
 254         }
 255 
 256         $links = $toolbar->getLinks();
 257 
 258         if (!empty($links))
 259         {
 260             echo "<ul class=\"nav nav-tabs\">\n";
 261 
 262             foreach ($links as $link)
 263             {
 264                 $dropdown = false;
 265 
 266                 if (array_key_exists('dropdown', $link))
 267                 {
 268                     $dropdown = $link['dropdown'];
 269                 }
 270 
 271                 if ($dropdown)
 272                 {
 273                     echo "<li";
 274                     $class = 'dropdown';
 275 
 276                     if ($link['active'])
 277                     {
 278                         $class .= ' active';
 279                     }
 280 
 281                     echo ' class="' . $class . '">';
 282 
 283                     echo '<a class="dropdown-toggle" data-toggle="dropdown" href="#">';
 284 
 285                     if ($link['icon'])
 286                     {
 287                         echo "<i class=\"icon icon-" . $link['icon'] . "\"></i>";
 288                     }
 289 
 290                     echo $link['name'];
 291                     echo '<b class="caret"></b>';
 292                     echo '</a>';
 293 
 294                     echo "\n<ul class=\"dropdown-menu\">";
 295 
 296                     foreach ($link['items'] as $item)
 297                     {
 298                         echo "<li";
 299 
 300                         if ($item['active'])
 301                         {
 302                             echo ' class="active"';
 303                         }
 304 
 305                         echo ">";
 306 
 307                         if ($item['icon'])
 308                         {
 309                             echo "<i class=\"icon icon-" . $item['icon'] . "\"></i>";
 310                         }
 311 
 312                         if ($item['link'])
 313                         {
 314                             echo "<a href=\"" . $item['link'] . "\">" . $item['name'] . "</a>";
 315                         }
 316                         else
 317                         {
 318                             echo $item['name'];
 319                         }
 320 
 321                         echo "</li>";
 322                     }
 323 
 324                     echo "</ul>\n";
 325                 }
 326                 else
 327                 {
 328                     echo "<li";
 329 
 330                     if ($link['active'])
 331                     {
 332                         echo ' class="active"';
 333                     }
 334 
 335                     echo ">";
 336 
 337                     if ($link['icon'])
 338                     {
 339                         echo "<i class=\"icon icon-" . $link['icon'] . "\"></i>";
 340                     }
 341 
 342                     if ($link['link'])
 343                     {
 344                         echo "<a href=\"" . $link['link'] . "\">" . $link['name'] . "</a>";
 345                     }
 346                     else
 347                     {
 348                         echo $link['name'];
 349                     }
 350                 }
 351 
 352                 echo "</li>\n";
 353             }
 354 
 355             echo "</ul>\n";
 356         }
 357     }
 358 
 359     /**
 360      * Renders the submenu (link bar) using Joomla!'s style. On Joomla! 2.5 this
 361      * is a list of bar separated links, on Joomla! 3 it's a sidebar at the
 362      * left-hand side of the page.
 363      *
 364      * @param   string    $view    The active view name
 365      * @param   string    $task    The current task
 366      * @param   FOFInput  $input   The input object
 367      * @param   array     $config  Extra configuration variables for the toolbar
 368      *
 369      * @return  void
 370      */
 371     protected function renderLinkbar_joomla($view, $task, $input, $config = array())
 372     {
 373         // On command line don't do anything
 374         if (FOFPlatform::getInstance()->isCli())
 375         {
 376             return;
 377         }
 378 
 379         // Do not render a submenu unless we are in the the admin area
 380         $toolbar                 = FOFToolbar::getAnInstance($input->getCmd('option', 'com_foobar'), $config);
 381         $renderFrontendSubmenu   = $toolbar->getRenderFrontendSubmenu();
 382 
 383         if (!FOFPlatform::getInstance()->isBackend() && !$renderFrontendSubmenu)
 384         {
 385             return;
 386         }
 387 
 388         $this->renderLinkbarItems($toolbar);
 389     }
 390 
 391     /**
 392      * do the rendering job for the linkbar
 393      *
 394      * @param   FOFToolbar  $toolbar  A toolbar object
 395      *
 396      * @return  void
 397      */
 398     protected function renderLinkbarItems($toolbar)
 399     {
 400         $links = $toolbar->getLinks();
 401 
 402         if (!empty($links))
 403         {
 404             foreach ($links as $link)
 405             {
 406                 JHtmlSidebar::addEntry($link['name'], $link['link'], $link['active']);
 407 
 408                 $dropdown = false;
 409 
 410                 if (array_key_exists('dropdown', $link))
 411                 {
 412                     $dropdown = $link['dropdown'];
 413                 }
 414 
 415                 if ($dropdown)
 416                 {
 417                     foreach ($link['items'] as $item)
 418                     {
 419                         JHtmlSidebar::addEntry('– ' . $item['name'], $item['link'], $item['active']);
 420                     }
 421                 }
 422             }
 423         }
 424     }
 425 
 426     /**
 427      * Renders the toolbar buttons
 428      *
 429      * @param   string    $view    The active view name
 430      * @param   string    $task    The current task
 431      * @param   FOFInput  $input   The input object
 432      * @param   array     $config  Extra configuration variables for the toolbar
 433      *
 434      * @return  void
 435      */
 436     protected function renderButtons($view, $task, $input, $config = array())
 437     {
 438         if (FOFPlatform::getInstance()->isCli())
 439         {
 440             return;
 441         }
 442 
 443         // Do not render buttons unless we are in the the frontend area and we are asked to do so
 444         $toolbar                 = FOFToolbar::getAnInstance($input->getCmd('option', 'com_foobar'), $config);
 445         $renderFrontendButtons   = $toolbar->getRenderFrontendButtons();
 446 
 447         // Load main backend language, in order to display toolbar strings
 448         // (JTOOLBAR_BACK, JTOOLBAR_PUBLISH etc etc)
 449         FOFPlatform::getInstance()->loadTranslations('joomla');
 450 
 451         if (FOFPlatform::getInstance()->isBackend() || !$renderFrontendButtons)
 452         {
 453             return;
 454         }
 455 
 456         $bar     = JToolbar::getInstance('toolbar');
 457         $items   = $bar->getItems();
 458 
 459         $substitutions = array(
 460             'icon-32-new'        => 'icon-plus',
 461             'icon-32-publish'    => 'icon-eye-open',
 462             'icon-32-unpublish'  => 'icon-eye-close',
 463             'icon-32-delete'     => 'icon-trash',
 464             'icon-32-edit'       => 'icon-edit',
 465             'icon-32-copy'       => 'icon-th-large',
 466             'icon-32-cancel'     => 'icon-remove',
 467             'icon-32-back'       => 'icon-circle-arrow-left',
 468             'icon-32-apply'      => 'icon-ok',
 469             'icon-32-save'       => 'icon-hdd',
 470             'icon-32-save-new'   => 'icon-repeat',
 471         );
 472 
 473         if(isset(JFactory::getApplication()->JComponentTitle))
 474         {
 475             $title   = JFactory::getApplication()->JComponentTitle;
 476         }
 477         else
 478         {
 479             $title = '';
 480         }
 481 
 482         $html    = array();
 483         $actions = array();
 484 
 485         // For BC we have to use the same id we're using inside other renderers (FOFHeaderHolder)
 486         //$html[]    = '<div class="well" id="' . $bar->getName() . '">';
 487 
 488         $html[]  = '<div class="well" id="FOFHeaderHolder">';
 489         $html[]  =      '<div class="titleHolder">'.$title.'</div>';
 490         $html[]  =      '<div class="buttonsHolder">';
 491 
 492         foreach ($items as $node)
 493         {
 494             $type    = $node[0];
 495             $button  = $bar->loadButtonType($type);
 496 
 497             if ($button !== false)
 498             {
 499                 if (method_exists($button, 'fetchId'))
 500                 {
 501                     $id = call_user_func_array(array(&$button, 'fetchId'), $node);
 502                 }
 503                 else
 504                 {
 505                     $id = null;
 506                 }
 507 
 508                 $action     = call_user_func_array(array(&$button, 'fetchButton'), $node);
 509                 $action     = str_replace('class="toolbar"', 'class="toolbar btn"', $action);
 510                 $action     = str_replace('<span ', '<i ', $action);
 511                 $action     = str_replace('</span>', '</i>', $action);
 512                 $action     = str_replace(array_keys($substitutions), array_values($substitutions), $action);
 513                 $actions[]  = $action;
 514             }
 515         }
 516 
 517         $html   = array_merge($html, $actions);
 518         $html[] = '</div>';
 519         $html[] = '</div>';
 520 
 521         echo implode("\n", $html);
 522     }
 523 
 524     /**
 525      * Renders a FOFForm for a Browse view and returns the corresponding HTML
 526      *
 527      * @param   FOFForm   &$form  The form to render
 528      * @param   FOFModel  $model  The model providing our data
 529      * @param   FOFInput  $input  The input object
 530      *
 531      * @return  string    The HTML rendering of the form
 532      */
 533     protected function renderFormBrowse(FOFForm &$form, FOFModel $model, FOFInput $input)
 534     {
 535         $html = '';
 536 
 537         JHtml::_('behavior.multiselect');
 538 
 539         // Joomla! 3.0+ support
 540         if (version_compare(JVERSION, '3.0', 'ge'))
 541         {
 542             JHtml::_('bootstrap.tooltip');
 543             JHtml::_('dropdown.init');
 544             JHtml::_('formbehavior.chosen', 'select');
 545             $view    = $form->getView();
 546             $order   = $view->escape($view->getLists()->order);
 547             $html .= <<<HTML
 548 <script type="text/javascript">
 549     Joomla.orderTable = function() {
 550         table = document.getElementById("sortTable");
 551         direction = document.getElementById("directionTable");
 552         order = table.options[table.selectedIndex].value;
 553         if (order != '$order')
 554         {
 555             dirn = 'asc';
 556         }
 557         else {
 558             dirn = direction.options[direction.selectedIndex].value;
 559         }
 560         Joomla.tableOrdering(order, dirn);
 561     };
 562 </script>
 563 
 564 HTML;
 565         }
 566         else
 567         {
 568             JHtml::_('behavior.tooltip');
 569         }
 570 
 571         // Getting all header row elements
 572         $headerFields = $form->getHeaderset();
 573 
 574         // Get form parameters
 575         $show_header         = $form->getAttribute('show_header', 1);
 576         $show_filters        = $form->getAttribute('show_filters', 1);
 577         $show_pagination     = $form->getAttribute('show_pagination', 1);
 578         $norows_placeholder  = $form->getAttribute('norows_placeholder', '');
 579 
 580         // Joomla! 3.0 sidebar support
 581 
 582         if (version_compare(JVERSION, '3.0', 'gt'))
 583         {
 584             $form_class = '';
 585 
 586             if ($show_filters)
 587             {
 588                 JHtmlSidebar::setAction("index.php?option=" .
 589                     $input->getCmd('option') . "&view=" .
 590                     FOFInflector::pluralize($input->getCmd('view'))
 591                 );
 592             }
 593 
 594             // Reorder the fields with ordering first
 595             $tmpFields = array();
 596             $i = 1;
 597 
 598             foreach ($headerFields as $tmpField)
 599             {
 600                 if ($tmpField instanceof FOFFormHeaderOrdering)
 601                 {
 602                     $tmpFields[0] = $tmpField;
 603                 }
 604 
 605                 else
 606                 {
 607                     $tmpFields[$i] = $tmpField;
 608                 }
 609 
 610                 $i++;
 611             }
 612 
 613             $headerFields = $tmpFields;
 614             ksort($headerFields, SORT_NUMERIC);
 615         }
 616         else
 617         {
 618             $form_class = 'class="form-horizontal"';
 619         }
 620 
 621         // Pre-render the header and filter rows
 622         $header_html = '';
 623         $filter_html = '';
 624         $sortFields  = array();
 625 
 626         if ($show_header || $show_filters)
 627         {
 628             foreach ($headerFields as $headerField)
 629             {
 630                 $header      = $headerField->header;
 631                 $filter      = $headerField->filter;
 632                 $buttons     = $headerField->buttons;
 633                 $options     = $headerField->options;
 634                 $sortable    = $headerField->sortable;
 635                 $tdwidth     = $headerField->tdwidth;
 636 
 637                 // Under Joomla! < 3.0 we can't have filter-only fields
 638 
 639                 if (version_compare(JVERSION, '3.0', 'lt') && empty($header))
 640                 {
 641                     continue;
 642                 }
 643 
 644                 // If it's a sortable field, add to the list of sortable fields
 645 
 646                 if ($sortable)
 647                 {
 648                     $sortFields[$headerField->name] = JText::_($headerField->label);
 649                 }
 650 
 651                 // Get the table data width, if set
 652 
 653                 if (!empty($tdwidth))
 654                 {
 655                     $tdwidth = 'width="' . $tdwidth . '"';
 656                 }
 657                 else
 658                 {
 659                     $tdwidth = '';
 660                 }
 661 
 662                 if (!empty($header))
 663                 {
 664                     $header_html .= "\t\t\t\t\t<th $tdwidth>" . PHP_EOL;
 665                     $header_html .= "\t\t\t\t\t\t" . $header;
 666                     $header_html .= "\t\t\t\t\t</th>" . PHP_EOL;
 667                 }
 668 
 669                 if (version_compare(JVERSION, '3.0', 'ge'))
 670                 {
 671                     // Joomla! 3.0 or later
 672                     if (!empty($filter))
 673                     {
 674                         $filter_html .= '<div class="filter-search btn-group pull-left">' . "\n";
 675                         $filter_html .= "\t" . '<label for="title" class="element-invisible">';
 676                         $filter_html .= JText::_($headerField->label);
 677                         $filter_html .= "</label>\n";
 678                         $filter_html .= "\t$filter\n";
 679                         $filter_html .= "</div>\n";
 680 
 681                         if (!empty($buttons))
 682                         {
 683                             $filter_html .= '<div class="btn-group pull-left hidden-phone">' . "\n";
 684                             $filter_html .= "\t$buttons\n";
 685                             $filter_html .= '</div>' . "\n";
 686                         }
 687                     }
 688                     elseif (!empty($options))
 689                     {
 690                         $label = $headerField->label;
 691 
 692                         JHtmlSidebar::addFilter(
 693                             '- ' . JText::_($label) . ' -', (string) $headerField->name,
 694                             JHtml::_(
 695                                 'select.options',
 696                                 $options,
 697                                 'value',
 698                                 'text',
 699                                 $model->getState($headerField->name, ''), true
 700                             )
 701                         );
 702                     }
 703                 }
 704                 else
 705                 {
 706                     // Joomla! 2.5
 707                     $filter_html .= "\t\t\t\t\t<td>" . PHP_EOL;
 708 
 709                     if (!empty($filter))
 710                     {
 711                         $filter_html .= "\t\t\t\t\t\t$filter" . PHP_EOL;
 712 
 713                         if (!empty($buttons))
 714                         {
 715                             $filter_html .= '<div class="btn-group hidden-phone">' . PHP_EOL;
 716                             $filter_html .= "\t\t\t\t\t\t$buttons" . PHP_EOL;
 717                             $filter_html .= '</div>' . PHP_EOL;
 718                         }
 719                     }
 720                     elseif (!empty($options))
 721                     {
 722                         $label       = $headerField->label;
 723                         $emptyOption = JHtml::_('select.option', '', '- ' . JText::_($label) . ' -');
 724                         array_unshift($options, $emptyOption);
 725                         $attribs     = array(
 726                             'onchange' => 'document.adminForm.submit();'
 727                         );
 728                         $filter      = JHtml::_('select.genericlist', $options, $headerField->name, $attribs, 'value', 'text', $headerField->value, false, true);
 729                         $filter_html .= "\t\t\t\t\t\t$filter" . PHP_EOL;
 730                     }
 731 
 732                     $filter_html .= "\t\t\t\t\t</td>" . PHP_EOL;
 733                 }
 734             }
 735         }
 736 
 737         // Start the form
 738         $filter_order        = $form->getView()->getLists()->order;
 739         $filter_order_Dir    = $form->getView()->getLists()->order_Dir;
 740         $actionUrl           = FOFPlatform::getInstance()->isBackend() ? 'index.php' : JUri::root().'index.php';
 741 
 742         if (FOFPlatform::getInstance()->isFrontend() && ($input->getCmd('Itemid', 0) != 0))
 743         {
 744             $itemid = $input->getCmd('Itemid', 0);
 745             $uri = new JUri($actionUrl);
 746 
 747             if ($itemid)
 748             {
 749                 $uri->setVar('Itemid', $itemid);
 750             }
 751 
 752             $actionUrl = JRoute::_($uri->toString());
 753         }
 754 
 755         $html .= '<form action="'.$actionUrl.'" method="post" name="adminForm" id="adminForm" ' . $form_class . '>' . PHP_EOL;
 756 
 757         if (version_compare(JVERSION, '3.0', 'ge'))
 758         {
 759             // Joomla! 3.0+
 760             // Get and output the sidebar, if present
 761             $sidebar = JHtmlSidebar::render();
 762 
 763             if ($show_filters && !empty($sidebar))
 764             {
 765                 $html .= '<div id="j-sidebar-container" class="span2">' . "\n";
 766                 $html .= "\t$sidebar\n";
 767                 $html .= "</div>\n";
 768                 $html .= '<div id="j-main-container" class="span10">' . "\n";
 769             }
 770             else
 771             {
 772                 $html .= '<div id="j-main-container">' . "\n";
 773             }
 774 
 775             // Render header search fields, if the header is enabled
 776 
 777             if ($show_header)
 778             {
 779                 $html .= "\t" . '<div id="filter-bar" class="btn-toolbar">' . "\n";
 780                 $html .= "$filter_html\n";
 781 
 782                 if ($show_pagination)
 783                 {
 784                     // Render the pagination rows per page selection box, if the pagination is enabled
 785                     $html .= "\t" . '<div class="btn-group pull-right hidden-phone">' . "\n";
 786                     $html .= "\t\t" . '<label for="limit" class="element-invisible">' . JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC') . '</label>' . "\n";
 787                     $html .= "\t\t" . $model->getPagination()->getLimitBox() . "\n";
 788                     $html .= "\t" . '</div>' . "\n";
 789                 }
 790 
 791                 if (!empty($sortFields))
 792                 {
 793                     // Display the field sort order
 794                     $asc_sel     = ($view->getLists()->order_Dir == 'asc') ? 'selected="selected"' : '';
 795                     $desc_sel    = ($view->getLists()->order_Dir == 'desc') ? 'selected="selected"' : '';
 796                     $html .= "\t" . '<div class="btn-group pull-right hidden-phone">' . "\n";
 797                     $html .= "\t\t" . '<label for="directionTable" class="element-invisible">' . JText::_('JFIELD_ORDERING_DESC') . '</label>' . "\n";
 798                     $html .= "\t\t" . '<select name="directionTable" id="directionTable" class="input-medium" onchange="Joomla.orderTable()">' . "\n";
 799                     $html .= "\t\t\t" . '<option value="">' . JText::_('JFIELD_ORDERING_DESC') . '</option>' . "\n";
 800                     $html .= "\t\t\t" . '<option value="asc" ' . $asc_sel . '>' . JText::_('JGLOBAL_ORDER_ASCENDING') . '</option>' . "\n";
 801                     $html .= "\t\t\t" . '<option value="desc" ' . $desc_sel . '>' . JText::_('JGLOBAL_ORDER_DESCENDING') . '</option>' . "\n";
 802                     $html .= "\t\t" . '</select>' . "\n";
 803                     $html .= "\t" . '</div>' . "\n\n";
 804 
 805                     // Display the sort fields
 806                     $html .= "\t" . '<div class="btn-group pull-right">' . "\n";
 807                     $html .= "\t\t" . '<label for="sortTable" class="element-invisible">' . JText::_('JGLOBAL_SORT_BY') . '</label>' . "\n";
 808                     $html .= "\t\t" . '<select name="sortTable" id="sortTable" class="input-medium" onchange="Joomla.orderTable()">' . "\n";
 809                     $html .= "\t\t\t" . '<option value="">' . JText::_('JGLOBAL_SORT_BY') . '</option>' . "\n";
 810                     $html .= "\t\t\t" . JHtml::_('select.options', $sortFields, 'value', 'text', $view->getLists()->order) . "\n";
 811                     $html .= "\t\t" . '</select>' . "\n";
 812                     $html .= "\t" . '</div>' . "\n";
 813                 }
 814 
 815                 $html .= "\t</div>\n\n";
 816                 $html .= "\t" . '<div class="clearfix"> </div>' . "\n\n";
 817             }
 818         }
 819 
 820         // Start the table output
 821         $html .= "\t\t" . '<table class="table table-striped" id="itemsList">' . PHP_EOL;
 822 
 823         // Open the table header region if required
 824 
 825         if ($show_header || ($show_filters && version_compare(JVERSION, '3.0', 'lt')))
 826         {
 827             $html .= "\t\t\t<thead>" . PHP_EOL;
 828         }
 829 
 830         // Render the header row, if enabled
 831 
 832         if ($show_header)
 833         {
 834             $html .= "\t\t\t\t<tr>" . PHP_EOL;
 835             $html .= $header_html;
 836             $html .= "\t\t\t\t</tr>" . PHP_EOL;
 837         }
 838 
 839         // Render filter row if enabled
 840 
 841         if ($show_filters && version_compare(JVERSION, '3.0', 'lt'))
 842         {
 843             $html .= "\t\t\t\t<tr>";
 844             $html .= $filter_html;
 845             $html .= "\t\t\t\t</tr>";
 846         }
 847 
 848         // Close the table header region if required
 849 
 850         if ($show_header || ($show_filters && version_compare(JVERSION, '3.0', 'lt')))
 851         {
 852             $html .= "\t\t\t</thead>" . PHP_EOL;
 853         }
 854 
 855         // Loop through rows and fields, or show placeholder for no rows
 856         $html .= "\t\t\t<tbody>" . PHP_EOL;
 857         $fields      = $form->getFieldset('items');
 858         $num_columns = count($fields);
 859         $items       = $model->getItemList();
 860 
 861         if ($count = count($items))
 862         {
 863             $m = 1;
 864 
 865             foreach ($items as $i => $item)
 866             {
 867                 $table_item = $model->getTable();
 868                 $table_item->reset();
 869                 $table_item->bind($item);
 870 
 871                 $form->bind($item);
 872 
 873                 $m       = 1 - $m;
 874                 $class   = 'row' . $m;
 875 
 876                 $html .= "\t\t\t\t<tr class=\"$class\">" . PHP_EOL;
 877 
 878                 $fields = $form->getFieldset('items');
 879 
 880                 // Reorder the fields to have ordering first
 881                 if (version_compare(JVERSION, '3.0', 'gt'))
 882                 {
 883                     $tmpFields = array();
 884                     $j = 1;
 885 
 886                     foreach ($fields as $tmpField)
 887                     {
 888                         if ($tmpField instanceof FOFFormFieldOrdering)
 889                         {
 890                             $tmpFields[0] = $tmpField;
 891                         }
 892 
 893                         else
 894                         {
 895                             $tmpFields[$j] = $tmpField;
 896                         }
 897 
 898                         $j++;
 899                     }
 900 
 901                     $fields = $tmpFields;
 902                     ksort($fields, SORT_NUMERIC);
 903                 }
 904 
 905                 foreach ($fields as $field)
 906                 {
 907                     $field->rowid    = $i;
 908                     $field->item     = $table_item;
 909                     $labelClass = $field->labelClass ? $field->labelClass : $field->labelclass; // Joomla! 2.5/3.x use different case for the same name
 910                     $class           = $labelClass ? 'class ="' . $labelClass . '"' : '';
 911                     $html .= "\t\t\t\t\t<td $class>" . $field->getRepeatable() . '</td>' . PHP_EOL;
 912                 }
 913 
 914                 $html .= "\t\t\t\t</tr>" . PHP_EOL;
 915             }
 916         }
 917         elseif ($norows_placeholder)
 918         {
 919             $html .= "\t\t\t\t<tr><td colspan=\"$num_columns\">";
 920             $html .= JText::_($norows_placeholder);
 921             $html .= "</td></tr>\n";
 922         }
 923 
 924         $html .= "\t\t\t</tbody>" . PHP_EOL;
 925 
 926         // Render the pagination bar, if enabled, on J! 2.5
 927         if ($show_pagination && version_compare(JVERSION, '3.0', 'lt'))
 928         {
 929             $pagination = $model->getPagination();
 930             $html .= "\t\t\t<tfoot>" . PHP_EOL;
 931             $html .= "\t\t\t\t<tr><td colspan=\"$num_columns\">";
 932 
 933             if (($pagination->total > 0))
 934             {
 935                 $html .= $pagination->getListFooter();
 936             }
 937 
 938             $html .= "</td></tr>\n";
 939             $html .= "\t\t\t</tfoot>" . PHP_EOL;
 940         }
 941 
 942         // End the table output
 943         $html .= "\t\t" . '</table>' . PHP_EOL;
 944 
 945         // Render the pagination bar, if enabled, on J! 3.0+
 946 
 947         if ($show_pagination && version_compare(JVERSION, '3.0', 'ge'))
 948         {
 949             $html .= $model->getPagination()->getListFooter();
 950         }
 951 
 952         // Close the wrapper element div on Joomla! 3.0+
 953 
 954         if (version_compare(JVERSION, '3.0', 'ge'))
 955         {
 956             $html .= "</div>\n";
 957         }
 958 
 959         $html .= "\t" . '<input type="hidden" name="option" value="' . $input->getCmd('option') . '" />' . PHP_EOL;
 960         $html .= "\t" . '<input type="hidden" name="view" value="' . FOFInflector::pluralize($input->getCmd('view')) . '" />' . PHP_EOL;
 961         $html .= "\t" . '<input type="hidden" name="task" value="' . $input->getCmd('task', 'browse') . '" />' . PHP_EOL;
 962         $html .= "\t" . '<input type="hidden" name="layout" value="' . $input->getCmd('layout', '') . '" />' . PHP_EOL;
 963 
 964         // The id field is required in Joomla! 3 front-end to prevent the pagination limit box from screwing it up. Huh!!
 965 
 966         if (version_compare(JVERSION, '3.0', 'ge') && FOFPlatform::getInstance()->isFrontend())
 967         {
 968             $html .= "\t" . '<input type="hidden" name="id" value="' . $input->getCmd('id', '') . '" />' . PHP_EOL;
 969         }
 970 
 971         $html .= "\t" . '<input type="hidden" name="boxchecked" value="" />' . PHP_EOL;
 972         $html .= "\t" . '<input type="hidden" name="hidemainmenu" value="" />' . PHP_EOL;
 973         $html .= "\t" . '<input type="hidden" name="filter_order" value="' . $filter_order . '" />' . PHP_EOL;
 974         $html .= "\t" . '<input type="hidden" name="filter_order_Dir" value="' . $filter_order_Dir . '" />' . PHP_EOL;
 975 
 976         $html .= "\t" . '<input type="hidden" name="' . JFactory::getSession()->getFormToken() . '" value="1" />' . PHP_EOL;
 977 
 978         // End the form
 979         $html .= '</form>' . PHP_EOL;
 980 
 981         return $html;
 982     }
 983 
 984     /**
 985      * Renders a FOFForm for a Read view and returns the corresponding HTML
 986      *
 987      * @param   FOFForm   &$form  The form to render
 988      * @param   FOFModel  $model  The model providing our data
 989      * @param   FOFInput  $input  The input object
 990      *
 991      * @return  string    The HTML rendering of the form
 992      */
 993     protected function renderFormRead(FOFForm &$form, FOFModel $model, FOFInput $input)
 994     {
 995         $html = $this->renderFormRaw($form, $model, $input, 'read');
 996 
 997         return $html;
 998     }
 999 
1000     /**
1001      * Renders a FOFForm for an Edit view and returns the corresponding HTML
1002      *
1003      * @param   FOFForm   &$form  The form to render
1004      * @param   FOFModel  $model  The model providing our data
1005      * @param   FOFInput  $input  The input object
1006      *
1007      * @return  string    The HTML rendering of the form
1008      */
1009     protected function renderFormEdit(FOFForm &$form, FOFModel $model, FOFInput $input)
1010     {
1011         // Get the key for this model's table
1012         $key         = $model->getTable()->getKeyName();
1013         $keyValue    = $model->getId();
1014 
1015         $html = '';
1016 
1017         $validate    = strtolower($form->getAttribute('validate'));
1018 
1019         if (in_array($validate, array('true', 'yes', '1', 'on')))
1020         {
1021             JHtml::_('behavior.formvalidation');
1022             $class = ' form-validate';
1023             $this->loadValidationScript($form);
1024         }
1025         else
1026         {
1027             $class = '';
1028         }
1029 
1030         // Check form enctype. Use enctype="multipart/form-data" to upload binary files in your form.
1031         $template_form_enctype = $form->getAttribute('enctype');
1032 
1033         if (!empty($template_form_enctype))
1034         {
1035             $enctype = ' enctype="' . $form->getAttribute('enctype') . '" ';
1036         }
1037         else
1038         {
1039             $enctype = '';
1040         }
1041 
1042         // Check form name. Use name="yourformname" to modify the name of your form.
1043         $formname = $form->getAttribute('name');
1044 
1045         if (empty($formname))
1046         {
1047             $formname = 'adminForm';
1048         }
1049 
1050         // Check form ID. Use id="yourformname" to modify the id of your form.
1051         $formid = $form->getAttribute('name');
1052 
1053         if (empty($formid))
1054         {
1055             $formid = 'adminForm';
1056         }
1057 
1058         // Check if we have a custom task
1059         $customTask = $form->getAttribute('customTask');
1060 
1061         if (empty($customTask))
1062         {
1063             $customTask = '';
1064         }
1065 
1066         // Get the form action URL
1067         $actionUrl = FOFPlatform::getInstance()->isBackend() ? 'index.php' : JUri::root().'index.php';
1068 
1069         if (FOFPlatform::getInstance()->isFrontend() && ($input->getCmd('Itemid', 0) != 0))
1070         {
1071             $itemid = $input->getCmd('Itemid', 0);
1072             $uri = new JUri($actionUrl);
1073 
1074             if ($itemid)
1075             {
1076                 $uri->setVar('Itemid', $itemid);
1077             }
1078 
1079             $actionUrl = JRoute::_($uri->toString());
1080         }
1081 
1082         $html .= '<form action="'.$actionUrl.'" method="post" name="' . $formname .
1083             '" id="' . $formid . '"' . $enctype . ' class="form-horizontal' .
1084             $class . '">' . PHP_EOL;
1085         $html .= "\t" . '<input type="hidden" name="option" value="' . $input->getCmd('option') . '" />' . PHP_EOL;
1086         $html .= "\t" . '<input type="hidden" name="view" value="' . $input->getCmd('view', 'edit') . '" />' . PHP_EOL;
1087         $html .= "\t" . '<input type="hidden" name="task" value="' . $customTask . '" />' . PHP_EOL;
1088         $html .= "\t" . '<input type="hidden" name="' . $key . '" value="' . $keyValue . '" />' . PHP_EOL;
1089 
1090         $html .= "\t" . '<input type="hidden" name="' . JFactory::getSession()->getFormToken() . '" value="1" />' . PHP_EOL;
1091 
1092         $html .= $this->renderFormRaw($form, $model, $input, 'edit');
1093         $html .= '</form>';
1094 
1095         return $html;
1096     }
1097 
1098     /**
1099      * Renders a raw FOFForm and returns the corresponding HTML
1100      *
1101      * @param   FOFForm   &$form     The form to render
1102      * @param   FOFModel  $model     The model providing our data
1103      * @param   FOFInput  $input     The input object
1104      * @param   string    $formType  The form type e.g. 'edit' or 'read'
1105      *
1106      * @return  string    The HTML rendering of the form
1107      */
1108     protected function renderFormRaw(FOFForm &$form, FOFModel $model, FOFInput $input, $formType)
1109     {
1110         $html = '';
1111         $tabHtml = array();
1112 
1113         // Do we have a tabbed form?
1114         $isTabbed = $form->getAttribute('tabbed', '0');
1115         $isTabbed = in_array($isTabbed, array('true', 'yes', 'on', '1'));
1116 
1117         foreach ($form->getFieldsets() as $fieldset)
1118         {
1119             if ($isTabbed && $this->isTabFieldset($fieldset))
1120             {
1121                 continue;
1122             }
1123             elseif ($isTabbed && isset($fieldset->innertab))
1124             {
1125                 $inTab = $fieldset->innertab;
1126             }
1127             else
1128             {
1129                 $inTab = '__outer';
1130             }
1131 
1132             $tabHtml[$inTab][] = $this->renderFieldset($fieldset, $form, $model, $input, $formType, false);
1133         }
1134 
1135         // If the form is tabbed, render the tabs bars
1136         if ($isTabbed)
1137         {
1138             $html .= '<ul class="nav nav-tabs">' . PHP_EOL;
1139 
1140             foreach ($form->getFieldsets() as $fieldset)
1141             {
1142                 // Only create tabs for tab fieldsets
1143                 $isTabbedFieldset = $this->isTabFieldset($fieldset);
1144                 if (!$isTabbedFieldset)
1145                 {
1146                     continue;
1147                 }
1148 
1149                 // Only create tabs if we do have a label
1150                 if (!isset($fieldset->label) || empty($fieldset->label))
1151                 {
1152                     continue;
1153                 }
1154 
1155                 $label = JText::_($fieldset->label);
1156                 $name = $fieldset->name;
1157                 $liClass = ($isTabbedFieldset == 2) ? 'class="active"' : '';
1158 
1159                 $html .= "<li $liClass><a href=\"#$name\" data-toggle=\"tab\">$label</a></li>" . PHP_EOL;
1160             }
1161 
1162             $html .= '</ul>' . "\n\n<div class=\"tab-content\">" . PHP_EOL;
1163 
1164             foreach ($form->getFieldsets() as $fieldset)
1165             {
1166                 if (!$this->isTabFieldset($fieldset))
1167                 {
1168                     continue;
1169                 }
1170 
1171                 $html .= $this->renderFieldset($fieldset, $form, $model, $input, $formType, false, $tabHtml);
1172             }
1173 
1174             $html .= "</div>\n";
1175         }
1176 
1177         if (isset($tabHtml['__outer']))
1178         {
1179             $html .= implode('', $tabHtml['__outer']);
1180         }
1181 
1182         return $html;
1183     }
1184 
1185     /**
1186      * Renders a raw fieldset of a FOFForm and returns the corresponding HTML
1187      *
1188      * @param   stdClass  &$fieldset   The fieldset to render
1189      * @param   FOFForm   &$form       The form to render
1190      * @param   FOFModel  $model       The model providing our data
1191      * @param   FOFInput  $input       The input object
1192      * @param   string    $formType    The form type e.g. 'edit' or 'read'
1193      * @param   boolean   $showHeader  Should I render the fieldset's header?
1194      *
1195      * @return  string    The HTML rendering of the fieldset
1196      */
1197     protected function renderFieldset(stdClass &$fieldset, FOFForm &$form, FOFModel $model, FOFInput $input, $formType, $showHeader = true, &$innerHtml = null)
1198     {
1199         $html = '';
1200 
1201         $fields = $form->getFieldset($fieldset->name);
1202 
1203         if (isset($fieldset->class))
1204         {
1205             $class = 'class="' . $fieldset->class . '"';
1206         }
1207         else
1208         {
1209             $class = '';
1210         }
1211 
1212         if (isset($innerHtml[$fieldset->name]))
1213         {
1214             $innerclass = isset($fieldset->innerclass) ? ' class="' . $fieldset->innerclass . '"' : '';
1215 
1216             $html .= "\t" . '<div id="' . $fieldset->name . '" ' . $class . '>' . PHP_EOL;
1217             $html .= "\t\t" . '<div' . $innerclass . '>' . PHP_EOL;
1218         }
1219         else
1220         {
1221             $html .= "\t" . '<div id="' . $fieldset->name . '" ' . $class . '>' . PHP_EOL;
1222         }
1223 
1224         $isTabbedFieldset = $this->isTabFieldset($fieldset);
1225 
1226         if (isset($fieldset->label) && !empty($fieldset->label) && !$isTabbedFieldset)
1227         {
1228             $html .= "\t\t" . '<h3>' . JText::_($fieldset->label) . '</h3>' . PHP_EOL;
1229         }
1230 
1231         foreach ($fields as $field)
1232         {
1233             $groupClass  = $form->getFieldAttribute($field->fieldname, 'groupclass', '', $field->group);
1234 
1235             // Auto-generate label and description if needed
1236             // Field label
1237             $title       = $form->getFieldAttribute($field->fieldname, 'label', '', $field->group);
1238             $emptylabel  = $form->getFieldAttribute($field->fieldname, 'emptylabel', false, $field->group);
1239 
1240             if (empty($title) && !$emptylabel)
1241             {
1242                 $model->getName();
1243                 $title = strtoupper($input->get('option') . '_' . $model->getName() . '_' . $field->id . '_LABEL');
1244             }
1245 
1246             // Field description
1247             $description = $form->getFieldAttribute($field->fieldname, 'description', '', $field->group);
1248 
1249             /**
1250              * The following code is backwards incompatible. Most forms don't require a description in their form
1251              * fields. Having to use emptydescription="1" on each one of them is an overkill. Removed.
1252              */
1253             /*
1254             $emptydescription   = $form->getFieldAttribute($field->fieldname, 'emptydescription', false, $field->group);
1255             if (empty($description) && !$emptydescription)
1256             {
1257                 $description = strtoupper($input->get('option') . '_' . $model->getName() . '_' . $field->id . '_DESC');
1258             }
1259             */
1260 
1261             if ($formType == 'read')
1262             {
1263                 $inputField = $field->static;
1264             }
1265             elseif ($formType == 'edit')
1266             {
1267                 $inputField = $field->input;
1268             }
1269 
1270             if (empty($title))
1271             {
1272                 $html .= "\t\t\t" . $inputField . PHP_EOL;
1273 
1274                 if (!empty($description) && $formType == 'edit')
1275                 {
1276                     $html .= "\t\t\t\t" . '<span class="help-block">';
1277                     $html .= JText::_($description) . '</span>' . PHP_EOL;
1278                 }
1279             }
1280             else
1281             {
1282                 $html .= "\t\t\t" . '<div class="control-group ' . $groupClass . '">' . PHP_EOL;
1283                 $html .= $this->renderFieldsetLabel($field, $form, $title);
1284                 $html .= "\t\t\t\t" . '<div class="controls">' . PHP_EOL;
1285                 $html .= "\t\t\t\t\t" . $inputField . PHP_EOL;
1286 
1287                 if (!empty($description))
1288                 {
1289                     $html .= "\t\t\t\t" . '<span class="help-block">';
1290                     $html .= JText::_($description) . '</span>' . PHP_EOL;
1291                 }
1292 
1293                 $html .= "\t\t\t\t" . '</div>' . PHP_EOL;
1294                 $html .= "\t\t\t" . '</div>' . PHP_EOL;
1295             }
1296         }
1297 
1298         if (isset($innerHtml[$fieldset->name]))
1299         {
1300             $html .= "\t\t" . '</div>' . PHP_EOL;
1301             $html .= implode('', $innerHtml[$fieldset->name]) . PHP_EOL;
1302             $html .= "\t" . '</div>' . PHP_EOL;
1303         }
1304         else
1305         {
1306             $html .= "\t" . '</div>' . PHP_EOL;
1307         }
1308 
1309         return $html;
1310     }
1311 
1312     /**
1313      * Renders a label for a fieldset.
1314      *
1315      * @param   object      $field      The field of the label to render
1316      * @param   FOFForm     &$form      The form to render
1317      * @param   string      $title      The title of the label
1318      *
1319      * @return  string      The rendered label
1320      */
1321     protected function renderFieldsetLabel($field, FOFForm &$form, $title)
1322     {
1323         $html = '';
1324 
1325         $labelClass  = $field->labelClass ? $field->labelClass : $field->labelclass; // Joomla! 2.5/3.x use different case for the same name
1326         $required    = $field->required;
1327 
1328         $tooltip = $form->getFieldAttribute($field->fieldname, 'tooltip', '', $field->group);
1329 
1330         if (!empty($tooltip))
1331         {
1332             if (version_compare(JVERSION, '3.0', 'ge'))
1333             {
1334                 static $loadedTooltipScript = false;
1335 
1336                 if (!$loadedTooltipScript)
1337                 {
1338                     $js = <<<JS
1339 (function($)
1340 {
1341     $(document).ready(function()
1342     {
1343         $('.fof-tooltip').tooltip({placement: 'top'});
1344     });
1345 })(akeeba.jQuery);
1346 JS;
1347                     $document = FOFPlatform::getInstance()->getDocument();
1348 
1349                     if ($document instanceof JDocument)
1350                     {
1351                         $document->addScriptDeclaration($js);
1352                     }
1353 
1354                     $loadedTooltipScript = true;
1355                 }
1356 
1357                 $tooltipText = '<strong>' . JText::_($title) . '</strong><br />' . JText::_($tooltip);
1358 
1359                 $html .= "\t\t\t\t" . '<label class="control-label fof-tooltip ' . $labelClass . '" for="' . $field->id . '" title="' . $tooltipText . '" data-toggle="fof-tooltip">';
1360             }
1361             else
1362             {
1363                 // Joomla! 2.5 has a conflict with the jQueryUI tooltip, therefore we
1364                 // have to use native Joomla! 2.5 tooltips
1365                 JHtml::_('behavior.tooltip');
1366 
1367                 $tooltipText = JText::_($title) . '::' . JText::_($tooltip);
1368 
1369                 $html .= "\t\t\t\t" . '<label class="control-label hasTip ' . $labelClass . '" for="' . $field->id . '" title="' . $tooltipText . '" rel="tooltip">';
1370             }
1371         }
1372         else
1373         {
1374             $html .= "\t\t\t\t" . '<label class="control-label ' . $labelClass . '" for="' . $field->id . '">';
1375         }
1376 
1377         $html .= JText::_($title);
1378 
1379         if ($required)
1380         {
1381             $html .= ' *';
1382         }
1383 
1384         $html .= '</label>' . PHP_EOL;
1385 
1386         return $html;
1387     }
1388 }
1389 
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.