Overview

Namespaces

  • Cron
  • None

Classes

  • _HtmlGrid_TableOut
  • _TransactionModel_RawSaveOperation
  • AccessControlComponent
  • AccessControlHelper
  • ActionListHelper
  • ActiveDirectoryUtils
  • AddCurrentPidToSchedulingShellCallLogs
  • AnonymousFunctionOperation
  • ArrayUtil
  • AssociationIntegrityBehavior
  • AtomicOperation
  • AuthenticationComponent
  • AuthenticationController
  • AuthenticationUser
  • AutocompleteDatasourceComponent
  • BaseModelComponent
  • Basics
  • CakeLayersHelper
  • CheckAndRunShell
  • ClassSearcher
  • CommandLineUtil
  • CommonValidationBehavior
  • ConfigurableShellCallsSchedulingTask
  • ConfigurationKey
  • ConfigurationKeys
  • ConfigurationKeysController
  • Context
  • ContextComponent
  • ContextHelper
  • Contexts
  • ControllerInspector
  • ControllerMenuHelper
  • CreateJournalingTables
  • CreateTableConfigurationKeys
  • CreateTableSchedulingConfigurableShellCalls
  • CreateTableSchedulingShellCallLogs
  • CreateTableSettedConfigurationKeys
  • CreateTableUserResetPasswordRequests
  • CreateTableUsers
  • CronSchedulingInstaller
  • CronValidationBehavior
  • CssBox
  • CssController
  • CssProperties
  • CssShell
  • CsvUtil
  • CustomDataModel
  • DatasourceDumperManager
  • DateTimeInput
  • DependencyShell
  • DetailHelper
  • DumperShell
  • ExtendedFieldsAccessControl
  • ExtendedFieldSet
  • ExtendedFieldSetHelper
  • ExtendedFieldsParser
  • ExtendedFormHelper
  • ExtendedHasManyAppModel
  • ExtendedOperationsBehavior
  • FieldDefinition
  • FieldRowDefinition
  • FieldSetDefinition
  • FieldSetLayoutHelper
  • FileOperations
  • FileOperations_Rename
  • FileOperations_SymLink
  • FileOperations_Touch
  • FileOperations_Unlink
  • FileSystem
  • FixConfigurationKeysPrimaryKey
  • FixSettedConfigurationKeysPrimaryKey
  • HasManyUtilsBehavior
  • HtmlDocument
  • HtmlGrid
  • HtmlGrid_Cell
  • HttpClient
  • HttpResponse
  • ImapClient
  • ImapMailBox
  • ImapParserShell
  • IncludePath
  • InputMasked
  • InputSearchable
  • InputsOnSubmit
  • InstallShell
  • JenkinsBuildShell
  • Journal
  • JournalDetail
  • JournalizedBehavior
  • JsonResponseComponent
  • LayoutsHelper
  • Ldap
  • LdapUtils
  • ListFieldSet
  • ListFieldSetHelper
  • ListsHelper
  • MailParser
  • Make
  • MenuHelper
  • MigrationAllPluginsShell
  • ModelOperations
  • ModelOperations_Delete
  • ModelOperations_Save
  • ModelTraverser
  • MysqlDumper
  • OpenLdapUtils
  • PaginatorUtilComponent
  • PaginatorUtilComponentFilter
  • PaginatorUtilHelper
  • Plugin
  • PluginManager
  • Reflections
  • RenameEnabledToActiveFromUsersTable
  • RunShellCallShell
  • ScaffoldUtilComponent
  • ScaffoldUtilHelper
  • Scheduling
  • SchedulingConfigurableShellCall
  • SchedulingConfigurableShellCallsController
  • SchedulingShellCallLog
  • SchedulingShellCallLogsController
  • SettedConfigurationKey
  • StuffreposPluginsRename
  • TimeZoneBehavior
  • TransactionModel
  • TransactionOperation
  • Translator
  • TranslatorShell
  • User
  • UserAuthenticationComponent
  • UserChangePassword
  • UserResetPassword
  • UserResetPasswordRequest
  • UserResetPasswordRequestSubmission
  • UsersController
  • ViewUtilHelper

Interfaces

  • AccessControlFilter
  • CommitableOperation
  • DatasourceDumper
  • MakeListener
  • SchedulingInstaller
  • TasksObject
  • UndoableOperation

Exceptions

  • LdapObjectNotWritableException
  • ModelTraverserException
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: App::uses('AccessControlComponent', 'AccessControl.Controller/Component');
 4: 
 5: class ExtendedFieldSet {
 6: 
 7:     /**
 8:      *
 9:      * @var \FieldSetDefinition
10:      */
11:     private $fieldsetData;
12: 
13:     /**
14:      *
15:      * @var ExtendedFormHelper 
16:      */
17:     private $parent;
18: 
19:     public function __construct(ExtendedFormHelper $parent, \FieldSetDefinition $fieldsetData, $blacklist) {
20:         $this->parent = $parent;
21:         $this->fieldsetData = $fieldsetData;
22:         $this->blacklist = $blacklist;
23:     }
24: 
25:     public function output() {
26:         return $this->parent->Html->tag(
27:                         'fieldSet',
28:                         $this->_legend() .
29:                         $this->_inputs()
30:         );
31:     }
32: 
33:     private function _legend() {
34:         return $this->fieldsetData->getLabel() ?
35:                 $this->parent->Html->tag('legend', $this->fieldsetData->getLabel()) :
36:                 '';
37:     }
38: 
39:     private function _inputs() {
40:         return $this->parent->FieldSetLayout->fieldSet(
41:                         $this->_lines()
42:         );
43:     }
44: 
45:     private function _lines() {
46:         $lines = array();
47:         foreach ($this->fieldsetData->getLines() as $line) {
48:             $line = $this->_line($line);
49:             if (!empty($line)) {
50:                 $lines[] = $line;
51:             }
52:         }
53:         return $lines;
54:     }
55: 
56:     private function _line(\FieldRowDefinition $line) {
57:         $columns = array();
58:         foreach ($line->getFields() as $field) {
59:             $column = $this->_column($field);
60:             if (!empty($column)) {
61:                 list($label, $content) = $column;
62:                 $columns[$label] = $content;
63:             }
64:         }
65:         return $columns;
66:     }
67: 
68:     private function _column(\FieldDefinition $field) {
69:         return array(
70:             $this->_fieldLabel($field),
71:             $this->_fieldInput($field)
72:         );
73:     }
74: 
75:     private function _fieldLabel(\FieldDefinition $field) {
76:         return __d('extended_scaffold', Inflector::humanize($field->getName()));
77:     }
78: 
79:     private function _fieldInput(\FieldDefinition $field) {
80:         $options = $field->getOptions();
81:         $options['div'] = false;
82:         $options['label'] = false;
83:         return $this->parent->input($field->getName(), $options);
84:     }
85: 
86: }
87: 
API documentation generated by ApiGen 2.8.0