Ensures the content type appears in the searchable fields
@param array $_params
@return FieldList Form fields to use in searching
763823
public function scaffoldSearchFields($_params=null) {
        $fields=parent::scaffoldSearchFields($_params);
        
        if(!$fields->dataFieldByName('ClassNameNice')) {
            $classMap=ClassInfo::subclassesFor('KapostObject');
            unset($classMap['KapostObject']);
            
            foreach($classMap as $key=>$value) {
                $classMap[$key]=_t($key.'.SINGULARNAME', $value);
            }
            
            $fields->push(DropdownField::create('ClassNameNice', _t('KapostObject.CONTENT_TYPE', '_Content Type'), $classMap)->setEmptyString('('._t('Enum.ANY', 'Any').')'));
        }
        
        return $fields;
    }
83473
private function prepareQuery($params = []) {
		if(!is_array($params)) {
			return $params;
		}

		$query = [];

		foreach($params as $key => $value) {
			if(is_array($value)) {
				foreach($value as $element) {
					$query[] = sprintf(
						'%s[]=%s',
						$key,
						urlencode($element)
					);
				}
			} else {
				$query[] = sprintf(
					'%s=%s',
					$key,
					urlencode($value)
				);
			}
		}

		return implode("&",$query);
	}
528762
public function parameterFields()
    {
        $return = FieldList::create(
            $title = TextField::create(
                'Title', _t('CommentReport.NEWSSEARCHTITLE', 'Search newsitem')
            ), $count = DropdownField::create(
            'Comment', _t('CommentReport.COUNTFILTER', 'Comment count filter'), array(
                ''            => _t('CommentReport.ANY', 'All'),
                'SPAMCOUNT'   => _t('CommentReport.SPAMCOUNT', 'One or more spam comments'),
                'HIDDENCOUNT' => _t('CommentReport.HIDDENCOUNT', 'One or more hidden comments'),
            )
        )
        );

        return $return;
    }
113834
public function form_textarea($params) {
        if (!isset($params['field'])) {
            throw new \UnexpectedValueException("The field parameter is required.");
        }
        $value = isset($params['value']) ? $params['value'] : null;
        $attributes = isset($params['attrs']) ? $params['attrs'] : array();
        return Form::textarea($params['field'], $value, $attributes);
    }
860818
public function getCMSFields()
    {
        $commentField = $this->AllowHtml ? HTMLEditorField::class : TextareaField::class;
        $fields = new FieldList(
            $this
                ->obj('Created')
                ->scaffoldFormField($this->fieldLabel('Created'))
                ->performReadonlyTransformation(),
            TextField::create('Name', $this->fieldLabel('Name')),
            $commentField::create('Comment', $this->fieldLabel('Comment')),
            EmailField::create('Email', $this->fieldLabel('Email')),
            TextField::create('URL', $this->fieldLabel('URL')),
            FieldGroup::create(array(
                CheckboxField::create('Moderated', $this->fieldLabel('Moderated')),
                CheckboxField::create('IsSpam', $this->fieldLabel('IsSpam')),
            ))
                ->setTitle(_t(__CLASS__ . '.OPTIONS', 'Options'))
                ->setDescription(_t(
                    __CLASS__ . '.OPTION_DESCRIPTION',
                    'Unmoderated and spam comments will not be displayed until approved'
                ))
        );

        // Show member name if given
        if (($author = $this->Author()) && $author->exists()) {
            $fields->insertAfter(
                TextField::create('AuthorMember', $this->fieldLabel('Author'), $author->Title)
                    ->performReadonlyTransformation(),
                'Name'
            );
        }

        // Show parent comment if given
        if (($parent = $this->ParentComment()) && $parent->exists()) {
            $fields->push(new HeaderField(
                'ParentComment_Title',
                _t(__CLASS__ . '.ParentComment_Title', 'This comment is a reply to the below')
            ));
            // Created date
            // FIXME - the method setName in DatetimeField is not chainable, hence
            // the lack of chaining here
            $createdField = $parent
                ->obj('Created')
                ->scaffoldFormField($parent->fieldLabel('Created'));
            $createdField->setName('ParentComment_Created');
            $createdField->setValue($parent->Created);
            $createdField->performReadonlyTransformation();
            $fields->push($createdField);

            // Name (could be member or string value)
            $fields->push(
                $parent
                    ->obj('AuthorName')
                    ->scaffoldFormField($parent->fieldLabel('AuthorName'))
                    ->setName('ParentComment_AuthorName')
                    ->setValue($parent->getAuthorName())
                    ->performReadonlyTransformation()
            );

            // Comment body
            $fields->push(
                $parent
                    ->obj('EscapedComment')
                    ->scaffoldFormField($parent->fieldLabel(self::class))
                    ->setName('ParentComment_EscapedComment')
                    ->setValue($parent->Comment)
                    ->performReadonlyTransformation()
            );
        }

        $this->extend('updateCMSFields', $fields);
        return $fields;
    }
198363
public function search($params)
    {
        $query = Page::find();

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'id' => $this->id,
            'views' => $this->views,
            'status' => $this->status,
            'user_id' => $this->user_id,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
        ]);

        $query->andFilterWhere(['like', 'title', $this->title])
            ->andFilterWhere(['like', 'keywords', $this->keywords])
            ->andFilterWhere(['like', 'description', $this->description])
            ->andFilterWhere(['like', 'route', $this->route])
            ->andFilterWhere(['like', 'content', $this->content])
            ->andFilterWhere(['like', 'view', $this->view]);

        return $dataProvider;
    }
658504
protected function prepareParams(array $params)
    {
        foreach ($params as $key => $param) {
            if (gettype($param) === 'boolean') {
                $params[$key] = (string)(($param) ? 'true' : 'false');
            }
        }
        return $params;
    }
129750
public function getCMSFields()
    {
        $this->beforeUpdateCMSFields(function (FieldList $fields) {
            $fields
                ->fieldByName('Root.Main.HTML')
                ->setTitle(_t(__CLASS__ . '.ContentLabel', 'Content'));
        });
        return parent::getCMSFields();
    }
21369
public function form_input($params) {
        if (!isset($params['field'])) {
            throw new \UnexpectedValueException("The field parameter is required.");
        }
        $value = isset($params['value']) ? $params['value'] : null;
        $attributes = isset($params['attrs']) ? $params['attrs'] : array();
        return Form::input($params['field'], $value, $attributes);
    }
681366
public function getFrontEndFields($params = null)
    {
        $fields = parent::getFrontEndFields($params);
        $fields->removeByName(array(
            'MD5Email',
            'AkismetMarked',
            'Visible',
            'ShowGravatar',
            'News',
        ));
        $fields->replaceField('Email', EmailField::create('Email', $this->fieldLabel('Email')));
        $fields->replaceField('Comment', TextAreaField::create('Comment', $this->fieldLabel('Comment')));
        $fields->fieldByName('Comment')
            ->setColumns(20)
            ->setRows(10);

        return $fields;
    }
79216
public function search($params)
    {
        $query = Order::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        $query->andFilterWhere([
            'id' => $this->id,
            'ref_by' => $this->ref_by,
            'created_by' => $this->created_by,
            'updated_by' => $this->updated_by,
        ]);

        $query->andFilterWhere(['like', 'status', $this->status])
            ->andFilterWhere(['like', 'payment_method', $this->payment_method])
            ->andFilterWhere(['like', 'note', $this->note])
            ->andFilterWhere(['like', 'include_vat', $this->include_vat])
            ->andFilterWhere(['like', 'customer_username', $this->customer_username])
            ->andFilterWhere(['like', 'customer_phone', $this->customer_phone])
            ->andFilterWhere(['like', 'customer_name', $this->customer_name])
            ->andFilterWhere(['like', 'customer_email', $this->customer_email])
            ->andFilterWhere(['like', 'customer_address', $this->customer_address])
            ->andFilterWhere(['like', 'customer_company', $this->customer_company])
            ->andFilterWhere(['like', 'customer_area', $this->customer_area])
            ->andFilterWhere(['like', 'customer_tax_number', $this->customer_tax_number])
            ->andFilterWhere(['like', 'real_value', $this->real_value])
            ->andFilterWhere(['like', 'discount_value', $this->discount_value])
            ->andFilterWhere(['like', 'total_price', $this->total_price])
            ->andFilterWhere(['like', 'created_at', $this->created_at])
            ->andFilterWhere(['like', 'updated_at', $this->created_at]);

        return $dataProvider;
    }
1300629
public function getCMSFields()
    {
        $fields = parent::getCMSFields();
        $fields->addFieldsToTab(
            'Root.Main',
            array(
                DropdownField::create(
                    'ClassName',
                    _t('Placeable.TYPE', 'Type'),
                    singleton('RegionObject_Preset')->SubClassNames
                )->setEmptyString(_t('Placeable.NONE', 'None'))
            )
        );

        $fields->removeByName('PageTypes');
        $fields->addFieldsToTab(
            'Root.PageTypes',
            array(
                LabelField::create(
                    'PageTypesDescription',
                    _t('RegionObject_Preset.PAGETYPESDESCRIPTION', 'List of all page types that use this use this preset.')
                ),
                GridField::create(
                    'PageTypes',
                    _t('RegionObject_Preset.PAGETYPES', 'Page Types'),
                    $this->Objects(),
                    GridFieldConfig_Base::create()
                )
            )
        );

        $this->extend('updateCMSFields', $fields);
        return $fields;
    }
884580
protected function _createFields($requestParams)
    {
        $requiredParams = array("name", "fields");
        $options["headers"] = self::retrieveContentTypeHeader(self::CONTENT_TYPE_FORM);
        return $this->client->request($requestParams, $this->_endpointPlural . "/" . self::FIELDEDITOR, "post", $requiredParams, $options);
    }
380917
public function renderField(Field $field, array $params = [])
    {
        $params = $this->getRenderFieldBlockParameters($field, $params);

        return $this->fieldBlockRenderer->renderContentFieldView(
            $field->innerField,
            $field->fieldTypeIdentifier,
            $params
        );
    }
490533
public function getCMSFields() {
        $fields=new FieldList(
                            new TextField('Name', _t('SnippetLanguage.NAME', '_Name'), null, 100),
                            new TextField('FileExtension', _t('SnippetLanguage.FILE_EXTENSION', '_File Extension'), null, 45),
                            new CheckboxField('Hidden', _t('SnippetLanguage.HIDDEN', '_Hidden'))
                        );
        
        if($this->UserLanguage==false) {
            $fields->replaceField('Name', $fields->dataFieldByName('Name')->performReadonlyTransformation());
            $fields->replaceField('FileExtension', $fields->dataFieldByName('FileExtension')->performReadonlyTransformation());
        }
        
        return $fields;
    }
1123393
public function searchableFields()
    {
        $searchableFields = parent::searchableFields();
        unset($searchableFields['PublishFrom']);
        $searchableFields['Title'] = array(
            'field'  => 'TextField',
            'filter' => 'PartialMatchFilter',
            'title'  => _t('News.TITLE', 'Title')
        );
        $searchableFields['Author'] = array(
            'field'  => 'TextField',
            'filter' => 'PartialMatchFilter',
            'title'  => _t('News.AUTHOR', 'Author')
        );

        return $searchableFields;
    }
873569
public static function block_field_types() {

		static $field_types = null;

		if ( null === $field_types ) {
			$field_types = array( 'heading', 'html' );

			/**
			 * Returns the available text field types
			 *
			 * @since unknown
			 *
			 * @param object $field_types Outputs the field types
			 */

			$field_types = apply_filters( 'pods_block_field_types', $field_types );
		}

		return $field_types;
	}