resolve field edition depends on form configuration

@param FieldContract $control
@param array $editable
@param array $disabled
324178
protected function resolveEditableField(FieldContract $control, array $editable = array())
    {
        $name = $control->get('name');
        if ($control->force_editable) {
            return $control;
        }
        $shouldBeEdited = false;
        foreach ($editable as $editableField) {
            if ($name == $editableField['name']) {
                $shouldBeEdited = true;
                break;
            }
        }
        $disable    = $shouldBeEdited ? [] : ['disabled' => 'disabled', 'readonly' => 'readonly'];
        $attributes = array_merge($control->get('attributes'), $disable);
        $control->attributes($attributes);
        return $control;
    }
130621
@Fix(org.eclipse.xtext.xbase.validation.IssueCodes.VARIABLE_NAME_DISALLOWED)
	public void fixDisallowedFieldName(final Issue issue, IssueResolutionAcceptor acceptor) {
		MemberRenameModification.accept(this, issue, acceptor);
		MemberRemoveModification.accept(this, issue, acceptor);
	}
997815
protected function _foreignKeySQL($enableDisable)
    {
        $startQuote = $this->_startQuote;
        $endQuote = $this->_endQuote;
        if (!empty($this->_config['schema'])) {
            $schemaName = strtoupper($this->_config['schema']);
            $fromWhere = "from sys.all_constraints
                where owner = '{$schemaName}' and constraint_type = 'R'";
        } else {
            $fromWhere = "from sys.user_constraints
                where constraint_type = 'R'";
        }
        return "declare
            cursor c is select owner, table_name, constraint_name
                {$fromWhere};
            begin
                for r in c loop
                    execute immediate 'alter table " .
                    "{$startQuote}' || r.owner || '{$endQuote}." .
                    "{$startQuote}' || r.table_name || '{$endQuote} " .
                    "{$enableDisable} constraint " .
                    "{$startQuote}' || r.constraint_name || '{$endQuote}';
                end loop;
            end;";
    }
1066208
public function buildField(FormBuilderInterface $builder, $property, array $widget, $editMode)
    {
        if (!isset($widget['options'])) {
            $widget['options'] = array();
        }
        if( !isset($widget['attr']) ) {
            $widget['attr'] = array();
        }

        if (!isset($widget['type'])) {
            throw new \RuntimeException("You must specify a type for property $property");
        }

        $options = $widget['options'];
        $options['attr'] =  $widget['attr'];
        $type = $widget['type'];


        if( isset($widget['default']) && !$editMode) {
            $options['data'] = $widget['default'];
        }

        if( !isset($options['attr']) ) {
            $options['attr'] = array();
        }

        $options['attr']['data-property'] = $property;
        if( isset($parameters['data']) ) {
            $options['attr']['data-default-value'] = $parameters['data'];
        }

        // Transform validation constraints
        if (isset($options['constraints'])) {
            $options['constraints'] = $this->buildConstraints($options['constraints']);
        }

        $builder->add($property, $type, $options);
    }
1012746
protected function getFormFields(RequestHandler $controller = null, $formName, $context = [])
    {
        /** @var File $record */
        $record = $context['Record'];

        // Add status flag before extensions are triggered
        $this->beforeExtending('updateFormFields', function (FieldList $fields) use ($record, $context) {
            if ($this->getFormType($context) === static::TYPE_INSERT_MEDIA) {
                if ($record->appCategory() !== 'image') {
                    $unembedableMsg = _t(
                        __CLASS__ . '.UNEMEDABLE_MESSAGE',
                        '<p class="alert alert-info alert--no-border editor__top-message">' .
                        'This file type can only be inserted as a link. You can edit the link once it is inserted.' .
                        '</p>'
                    );
                    $fields->unshift(LiteralField::create('UnembedableMessage', $unembedableMsg));
                }
            }
            // @todo move specs to a component/class, so it can update specs when a File is replaced
            $fields->insertAfter(
                'TitleHeader',
                LiteralField::create('FileSpecs', $this->getSpecsMarkup($record))
            );
            $fields->push(HiddenField::create('FileFilename'));
            $fields->push(HiddenField::create('FileHash'));
            $fields->push(HiddenField::create('FileVariant'));
        });

        return parent::getFormFields($controller, $formName, $context);
    }
1217924
public function add(Field $control)
    {
        $renderable = $control instanceof \Illuminate\Contracts\Support\Renderable;


        $control->setField(function ($row, $cont, $templates) use ($control, $renderable) {

            $control = app(Control::class)
                    ->setTemplates($this->control->getTemplates())
                    ->setPresenter($this->control->getPresenter());

            $field = $control->buildFieldByType($cont->type, $row, $cont);
            $cont->setModel($row);
            if (($value = $cont->getValue()) !== false) {
                $field->value($value);
            }
            if ($renderable) {
                return $cont;
            }

            return $control->render([], $field);
        });


        $this->controls[] = $control;
        return $this;
    }
1298969
function checkIfAllowedInEditable( editable, style ) {
		var filter = CKEDITOR.filter.instances[ editable.data( 'cke-filter' ) ];

		return filter ? filter.check( style ) : 1;
	}
80255
public function add($name, $editableType, array $editableOptions = array())
	{
		$this->config->addProperty(
				$this->createProperty($name, $editableType, $editableOptions)
		);
		
		return $this;
	}
619285
public function actionEditableSaver()
    {
        Yii::import('EditableSaver'); //or you can add import 'ext.editable.*' to config
        $es = new EditableSaver('CcucUserCompany'); // classname of model to be updated
        $es->update();
        
        //verify if change statuss 
        if($es->attribute != 'ccuc_status'){
            return;
        }
        
        //verify if status changet to USER
        if($es->value != CcucUserCompany::CCUC_STATUS_USER){
            return;
        }
        
        //if do not have user, create
        $m = Person::model();
        return $m->createUser($es->model->ccucPerson->id);
        
    }
620471
public function editFormSucceeded(Form $form, ArrayHash $values): void
	{
		if ($this->content) {
			$content = $this->content;
		} else {
			$content = new Content;
			$this->orm->content->attach($content);
		}

		try {
			if ($this->editConst) {
				$content->locale = $values->locale;
				$content->setConst($values->const);
			}
			$content->name = $values->name;
			$content->title = $values->title;
			$content->keywords = $values->keywords;
			$content->image = $values->image;
			$content->background = $values->background;
			$content->description = $values->description;
			$content->content = $values->content;

			$this->orm->persistAndFlush($content);
			$this->restoreBacklink();
		} catch (UniqueConstraintViolationException $ex) {
			$form->addError('webManager.web.content.constantExists');
		}
	}
717295
public void setEditable(String editable) {

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(editable)) {
            m_editable = Boolean.valueOf(editable).booleanValue();
        }
    }
676343
public void enableFavoriteEditing(boolean enable, I_CmsDNDController dndController) {

        if (m_dndHandler.isDragging()) {
            // never switch drag and drop controllers while dragging
            return;
        }
        if (enable) {
            m_dndHandler.setController(dndController);
        } else {
            m_dndHandler.setController(m_cntDndController);
        }

    }
221109
function setEditType(field, editType) {
    var gridCompColumn = this.getColumnByField(field);
    gridCompColumn.options.editType = editType;
}
191977
private void setConditionEnabled(boolean enabled)
	{
		fConditionEditor.setEnabled(enabled);
		fSuspendWhenLabel.setEnabled(enabled);
		fConditionIsTrue.setEnabled(enabled);
		fConditionHasChanged.setEnabled(enabled);
	}
394967
function(oControl) {
			if (oControl && typeof oControl.getAccessibilityInfo === "function") {
				if (typeof oControl.getVisible === "function" && !oControl.getVisible()) {
					return ACCInfoHelper._normalize({});
				}
				var oSource = oControl.getAccessibilityInfo();
				if (oSource) {
					var oTarget = {};
					ACCInfoHelper._flatten(oSource, oTarget);
					return oTarget;
				}
			}
			return null;
		}
764212
protected function configureValueTransformers(Editable\Editable $editable, BlockProperty $property)
	{
		$transformers = array();

		if ($editable instanceof Editable\Html) {
			$transformers[] = new Transformer\HtmlEditorValueTransformer();
		} elseif ($editable instanceof Editable\Link) {
			$transformers[] = new Transformer\LinkEditorValueTransformer();
		} else if ($editable instanceof Editable\Image) {
			$transformers[] = new Transformer\ImageEditorValueTransformer();
		} else if ($editable instanceof Editable\Gallery) {
			$transformers[] = new Transformer\GalleryEditorValueTransformer();
		} else if ($editable instanceof Editable\InlineMap) {
			$transformers[] = new Transformer\ArrayValueTransformer();
		} elseif ($editable instanceof Editable\Video) {
			$transformers[] = new Transformer\VideoEditorValueTransformer();
		} elseif ($editable instanceof Editable\InlineMedia) {
			$transformers[] = new Transformer\InlineMediaEditorValueTransformer();
		}

		foreach ($transformers as $transformer) {
			if ($transformer instanceof ContainerAware) {
				$transformer->setContainer($this->container);
			}
			if ($transformer instanceof BlockPropertyAware) {
				$transformer->setBlockProperty($property);
			}

			$editable->addEditorValueTransformer($transformer);
		}
	}
667559
function getEditForm($id = null, $fields = null) {
		$record = null;

		if(!$id){
			$id = $this->getCurrentPageID();
		}

		if ($id && $id != "root") {
			$record = $this->getRecord($id);
		}

		if ($record) {
			$fields = $record->getCMSFields();

			// If we're editing an external source or item, and it can be imported
			// then add the "Import" tab.
			$isSource = $record instanceof ExternalContentSource;
			$isItem = $record instanceof ExternalContentItem;

			if (($isSource || $isItem) && $record->canImport()) {
				$allowedTypes = $record->allowedImportTargets();
				if (isset($allowedTypes['sitetree'])) {
					$fields->addFieldToTab('Root.Import', new TreeDropdownField("MigrationTarget", _t('ExternalContent.MIGRATE_TARGET', 'Page to import into'), 'SiteTree'));
				}

				if (isset($allowedTypes['file'])) {
					$fields->addFieldToTab('Root.Import', new TreeDropdownField("FileMigrationTarget", _t('ExternalContent.FILE_MIGRATE_TARGET', 'Folder to import into'), 'Folder'));
				}

				$fields->addFieldToTab('Root.Import', new CheckboxField("IncludeSelected", _t('ExternalContent.INCLUDE_SELECTED', 'Include Selected Item in Import')));
				$fields->addFieldToTab('Root.Import', new CheckboxField("IncludeChildren", _t('ExternalContent.INCLUDE_CHILDREN', 'Include Child Items in Import'), true));

				$duplicateOptions = array(
					ExternalContentTransformer::DS_OVERWRITE => ExternalContentTransformer::DS_OVERWRITE,
					ExternalContentTransformer::DS_DUPLICATE => ExternalContentTransformer::DS_DUPLICATE,
					ExternalContentTransformer::DS_SKIP => ExternalContentTransformer::DS_SKIP,
				);

				$fields->addFieldToTab('Root.Import', new OptionsetField(
						"DuplicateMethod",
						_t('ExternalContent.DUPLICATES', 'Select how duplicate items should be handled'),
						$duplicateOptions,
						$duplicateOptions[ExternalContentTransformer::DS_SKIP]
					)
				);

				if (class_exists('QueuedJobDescriptor')) {
					$repeats = array(
						0		=> 'None',
						300		=> '5 minutes',
						900		=> '15 minutes',
						1800	=> '30 minutes',
						3600	=> '1 hour',
						33200	=> '12 hours',
						86400	=> '1 day',
						604800	=> '1 week',
					);
					$fields->addFieldToTab('Root.Import', new DropdownField('Repeat', 'Repeat import each ', $repeats));
				}

				$migrateButton = FormAction::create('migrate', _t('ExternalContent.IMPORT', 'Start Importing'))
					->setAttribute('data-icon', 'arrow-circle-double')
					->setUseButtonTag(true);

				$fields->addFieldToTab('Root.Import', new LiteralField('MigrateActions', "<div class='Actions'>{$migrateButton->forTemplate()}</div>"));
			}

			$fields->push($hf = new HiddenField("ID"));
			$hf->setValue($id);

			$fields->push($hf = new HiddenField("Version"));
			$hf->setValue(1);

			$actions = new FieldList();

			$actions = CompositeField::create()->setTag('fieldset')->addExtraClass('ss-ui-buttonset');
			$actions = new FieldList($actions);

			// Only show save button if not 'assets' folder
			if ($record->canEdit()) {
				$actions->push(
					FormAction::create('save',_t('ExternalContent.SAVE','Save'))
						->addExtraClass('ss-ui-action-constructive')
						->setAttribute('data-icon', 'accept')
						->setUseButtonTag(true)
				);
			}

			if($isSource && $record->canDelete()){
				$actions->push(
					FormAction::create('delete',_t('ExternalContent.DELETE','Delete'))
						->addExtraClass('delete ss-ui-action-destructive')
						->setAttribute('data-icon', 'decline')
						->setUseButtonTag(true)
				);
			}




			$form = new Form($this, "EditForm", $fields, $actions);
			if ($record->ID) {
				$form->loadDataFrom($record);
			} else {
				$form->loadDataFrom(array(
					"ID" => "root",
					"URL" => Director::absoluteBaseURL() . self::$url_segment,
				));
			}

			if (!$record->canEdit()) {
				$form->makeReadonly();
			}

		} else {
			// Create a dummy form
			$fields = new FieldList();
			$form = new Form($this, "EditForm", $fields, new FieldList());
		}

		$form->addExtraClass('cms-edit-form center ss-tabset ' . $this->BaseCSSClasses());
		$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
		$form->setAttribute('data-pjax-fragment', 'CurrentForm');
		$this->extend('updateEditForm', $form);

		return $form;
	}