Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cContentTypePifaForm
  • DefaultFormModule
  • DefaultFormProcessor
  • ExampleOptionsDatasource
  • MailedFormProcessor
  • Pifa
  • PifaAbstractFormModule
  • PifaAbstractFormProcessor
  • PifaAjaxHandler
  • PifaExporter
  • PifaExternalOptionsDatasourceInterface
  • PifaField
  • PifaFieldCollection
  • PifaForm
  • PifaFormCollection
  • PifaImporter
  • PifaLeftBottomPage
  • PifaRightBottomFormDataPage
  • PifaRightBottomFormExportPage
  • PifaRightBottomFormFieldsPage
  • PifaRightBottomFormImportPage
  • PifaRightBottomFormPage

Exceptions

  • PifaDatabaseException
  • PifaException
  • PifaIllegalStateException
  • PifaMailException
  • PifaNotImplementedException
  • PifaNotYetStoredException
  • PifaValidationException
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: 
 3: /**
 4:  *
 5:  * @package Plugin
 6:  * @subpackage FormAssistant
 7:  * @author Marcus Gnaß <marcus.gnass@4fb.de>
 8:  * @copyright four for business AG
 9:  * @link http://www.4fb.de
10:  */
11: 
12: // assert CONTENIDO framework
13: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
14: 
15: plugin_include(Pifa::getName(), 'classes/class.pifa.external_options_datasource_interface.php');
16: 
17: /**
18:  * This is an example for an external options data source.
19:  *
20:  * @author Marcus Gnaß <marcus.gnass@4fb.de>
21:  */
22: class ExampleOptionsDatasource extends PifaExternalOptionsDatasourceInterface {
23: 
24:     /**
25:      * Stores the options as associative array which maps values to labels.
26:      *
27:      * @var array
28:      */
29:     protected $_options = NULL;
30: 
31:     /**
32:      * Gets options from an external data source and return them as associative
33:      * array which maps values to labels.
34:      *
35:      * @return array
36:      */
37:     protected function _getData() {
38:         $options = array(
39:             'n/a' => mi18n("CHOOSE_OPTION"),
40:             'foo' => mi18n("FOO"),
41:             'bar' => mi18n("BAR")
42:         );
43: 
44:         return $options;
45:     }
46: 
47:     /**
48:      *
49:      * @see ExternalOptionsDatasourceInterface::getOptionLabels()
50:      */
51:     public function getOptionLabels() {
52:         if (NULL === $this->_options) {
53:             $this->_options = $this->_getData();
54:         }
55:         return array_values($this->_options);
56:     }
57: 
58:     /**
59:      *
60:      * @see ExternalOptionsDatasourceInterface::getOptionValues()
61:      */
62:     public function getOptionValues() {
63:         if (NULL === $this->_options) {
64:             $this->_options = $this->_getData();
65:         }
66:         return array_keys($this->_options);
67:     }
68: }
69: 
CMS CONTENIDO 4.10.0 API documentation generated by ApiGen 2.8.0