set the "where list"

@param array $field_list

@return $this
177294
public function setWhereList($field_list = array())
    {
        if (empty($field_list)) $this->_where_list = array();
        $this->_where_list = (array)$field_list;

        return $this;
    }
351665
public function whereNotEndsWith($field, $value)
    {
        foreach ($this->queries as $query) {
            $query->whereNotEndsWith($field, $value);
        }

        return $this;
    }
952614
public function updateCMSFields(FieldList $fields)
    {
        if (Config::inst()->get(SeoObjectExtension::class, 'use_webmaster_tag')) {
            $fields->addFieldToTab(
                "Root.SEO",
                TextareaField::create(
                    "GoogleWebmasterMetaTag",
                    _t('SEO.SEOGoogleWebmasterMetaTag', 'Google webmaster meta tag')
                )->setRightTitle(_t(
                    'SEO.SEOGoogleWebmasterMetaTagRightTitle',
                    "Full Google webmaster meta tag For example &lt;meta name=\"google-site-verification\" content=\"hjhjhJHG12736JHGdfsdf\" /&gt;"
                ))
            );
        }
    }
1238259
public function whereContains($field, $value)
    {
        foreach ($this->queries as $query) {
            $query->whereContains($field, $value);
        }

        return $this;
    }
377610
public function updateCMSFields(FieldList $fields) {
		$fields->addFieldToTab('Root.Image', $uf = new UploadField('MainImage',
			_t('PageWithImage.MAIN_IMAGE', 'Main Image')));
		$uf->setFolderName('pagewithimage');
	}
387955
public function updateCMSFields(FieldList $fields)
    {
        $tabName = $this->owner->config()->get('meta_tab_name');
        // copy meta fields from main
        if ($Metadata = $fields->fieldByName('Root.Main.Metadata')) {
            $fields->removeFieldFromTab('Root.Main', 'Metadata');
            $fields->addFieldToTab(
                "Root.$tabName",
                TextField::create(
                    "MetaTitle",
                    _t('SiteTree.METATITLE', 'Meta Title')
                )
            );
            $fields->addFieldsToTab(
                "Root.$tabName",
                $Metadata->getChildren()
            );
            // Remove extra meta because we don't really need it
            $fields->removeByName('ExtraMeta');
            $fields->fieldByName("Root.$tabName.MetaDescription")
                ->setRows(2);
        }
        $fields->addFieldsToTab(
            "Root.$tabName",
            array(
                UploadField::create(
                    'MetaImageCustom',
                    _t('SiteTree.METAIMAGECUSTOM', 'Meta Image')
                )
                    ->setAllowedFileCategories('image')
                    ->setAllowedMaxFileNumber(1),
                HeaderField::create(
                    'RobotsHeader',
                    _t('SiteTree.ROBOTSHEADER', 'Search engine')
                ),
                CheckboxField::create(
                    'NoIndex',
                    _t('SiteTree.NOINDEX', 'Prevent indexing of this page')
                ),
                CheckboxField::create(
                    'NoFollow',
                    _t('SiteTree.NOFOLLOW', 'Prevent following links on this page')
                ),
                CheckboxField::create(
                    'NoSnippet',
                    _t('SiteTree.NOSNIPPET', 'Prevent showing a snippet of this page in the search results')
                ),
                CheckboxField::create(
                    'NoCache',
                    _t('SiteTree.NOCACHE', 'Prevent caching a version of this page')
                ),
                HeaderField::create(
                    'SocialHeader',
                    _t('SiteTree.SOCIALHEADER', 'Social')
                ),
                TextField::create(
                    'OGTitleCustom',
                    _t('SiteTree.SHARETITLE', 'Share title')
                )
                    ->setMaxLength(90),
                TextAreaField::create(
                    'OGDescriptionCustom',
                    _t('SiteTree.SHAREDESCRIPTION', 'Share description')
                )
                    ->setRows(2),
                UploadField::create(
                    'OGImageCustom',
                    _t('SiteTree.SHAREIMAGE', 'Share image')
                )
                    ->setAllowedFileCategories('image')
                    ->setAllowedMaxFileNumber(1)
                    ->setDescription('<a href="https://developers.facebook.com/docs/sharing/best-practices#images" target="_blank">Optimum image ratio</a> is 1.91:1. (1200px wide by 630px tall or better)'),
                // Facebook
                TextField::create(
                    "FBAuthorlink",
                    _t('SiteTree.FBAUTHORLINK', 'Facebook author')
                )
                    ->setRightTitle(_t('SiteTree.FBAUTHORLINKHELP', 'Author Facebook PROFILE URL')),
                TextField::create(
                    "FBPublisherlink",
                    _t('SiteTree.FBPUBLISHERLINK', 'Facebook publisher')
                )
                    ->setRightTitle(_t('SiteTree.FBPUBLISHERLINKHELP', 'Publisher Facebook PAGE URL')),
                // Google plus
                TextField::create(
                    "GplusAuthorlink",
                    _t('SiteTree.GPLUSAUTHORLINK', 'Google+ author')
                )
                    ->setRightTitle(_t('SiteTree.GPLUSAUTHORLINKHELP', 'Author Google+ PROFILE URL')),
                TextField::create(
                    "GplusPublisherlink",
                    _t('SiteTree.GPLUSPUBLISHERLINK', 'Google+ publisher')
                )
                    ->setRightTitle(_t('SiteTree.GPLUSPUBLISHERLINKHELP', 'Publisher Google+ PAGE URL')),
                HeaderField::create(
                    'RichSnippetsHeader',
                    _t('SiteTree.RICHSNIPPETSHEADER', 'Rich snippets')
                ),
                UploadField::create(
                    'BreadcrumbIcon',
                    _t('SiteTree.BREADCRUMBICON', 'Breadcrumb Icon')
                )
                    ->setAllowedFileCategories('image')
                    ->setAllowedMaxFileNumber(1)
            )
        );

        if (Config::inst()->get('ShareCare', 'pinterest')) {
            $fields->addFieldToTab(
                "Root.$tabName",
                UploadField::create(
                    'PinterestImageCustom',
                    _t('SiteTree.PINTERESTIMAGE', "Pinterest image")
                )
                    ->setAllowedFileCategories('image')
                    ->setAllowedMaxFileNumber(1)
                    ->setDescription('Square/portrait or taller images look best on Pinterest. This image should be at least 750px wide.'));
        }

        return $fields;
    }
1010241
public function updateCMSFields(FieldList $fields)
    {
        parent::updateCMSFields($fields);

        if (!isset(self::$collectorCache[$this->owner->class])) {
            return;
        }

        // remove all localized fields from the list (generated through scaffolding)
        foreach (self::$collectorCache[$this->owner->class] as $translatableField => $type) {
            $fields->removeByName($translatableField);
        }

        // check if we're in a translation
        if (Translatable::default_locale() != Translatable::get_current_locale()) {
            /** @var TranslatableFormFieldTransformation $transformation */
            $transformation = TranslatableFormFieldTransformation::create($this->owner);

            // iterate through all localized fields
            foreach (self::$collectorCache[$this->owner->class] as $translatableField => $type) {
                if (strpos($translatableField, Translatable::get_current_locale())) {
                    $basename = $this->getBasename($translatableField);

                    if ($field = $this->getLocalizedFormField($basename, Translatable::default_locale())) {
                        $fields->replaceField($basename, $transformation->transformFormField($field));
                    }
                }
            }
        }
    }
1214867
public function each($table, $fields, $where)
    {
    	$query = "SELECT $fields FROM {$table} ".mysql_args_compile($where);
//    	echo "$query\n";
		$this->query($query);
		$this->each_result = $this->result;
		return $this;
    }
807250
public function updateCMSFields(FieldList $fields)
    {
        $fields->addFieldsToTab(
            'Root.Actions',
            array(
                UploadField::create(
                    'ActionImage',
                    _t('Actions.IMAGE', 'Image')
                ),
                TextareaField::create(
                    'ActionSummary',
                    _t('Actions.SUMMARY', 'Summary')
                )->setRows(3),
                TextField::create(
                    'ActionLabel',
                    _t('Actions.LABEL', 'More')
                )
            )
        );
        return $fields;
    }
230069
public function updateCMSFields(FieldList $fields)
    {
        /** Setup new Root Fieldlist */
        $fields->removeByName('Main');
        $owner = $this->owner;
        /** Add the fields */
        $fields->addFieldsToTab(
            'Root', // To what tab
            Tab::create(
                'Main', // Name
                _t('Tag.MAIN', 'Main'), // Title
                /** Fields */
                $text = TextField::create('Title', $owner->fieldLabel('Title')), $html = HTMLEditorField::create('Description', $owner->fieldLabel('Description')), $uplo = UploadField::create('Impression', $owner->fieldLabel('Impression'))
            )
        );
    }
973819
public function updateCMSFields(FieldList $fields)
    {
        $fields->addFieldsToTab(
            'Root.Meta',
            array(
                UploadField::create('MetaImageCustom', 'Default Meta Image'),
                GridField::create(
                    'ContactPoints',
                    _t('SiteConfig.CONTACTPOINTS', 'Contact points'),
                    $this->owner->ContactPoints(),
                    GridFieldConfig_RecordEditor::create()
                ),
                GridField::create(
                    'LocalBusiness',
                    _t('SiteConfig.LOCALBUSINESS', 'Local business'),
                    $this->owner->LocalBusiness(),
                    GridFieldConfig_RecordEditor::create()
                )
            )
        );
        return $fields;
    }
1352719
protected function filterList(array &$list, array $allowed_fields, array $query)
    {
        $filter = array_intersect_key($query, array_flip($allowed_fields));

        if (!empty($filter)) {
            $list = array_filter($list, function ($item) use ($filter) {
                return $this->callbackFilterList($item, $filter);
            });
        }
    }
172943
public function where($field, $value)
    {
        if (strtolower($field) === "meta_query") {
            return $this->metaWhere($field, $value);
        } elseif (strtolower($field) === "tax_query") {
            return $this->taxWhere($field, $value);
        }

        $this->filters[$field] = $value;
        return $this;
    }
748981
public function andWhere($field, $op, $value)
    {
        $this->where($field, $op, $value);

        return $this;
    }
9029
public function setWhere(array $where)
    {
        // When the statement is empty set the
        // where property to null to prevent
        // empty statement errors.
        if (empty($where)) {
            // delete the current where statement
            $this->where = null;

            // Skip further execution
            return $this;
        }

        // Ensure the base $or clause
        if (! isset($where['$or'])) {
            // wrap the statement in an $or clause
            $where = ['$or' => [$where]];
        }

        // Fetch the last clause in the $or array
        // to allow further chaining it's required
        // to be wrapped in an @and statement.
        $lastClause = array_pop($where['$or']);

        if (! isset($lastClause['$and'])) {
            // Wrap in an @and statement
            $lastClause = ['$and' => [$lastClause]];
        }

        // Re-append the $and clause
        $where['$or'][] = $lastClause;

        // Replace the base where statement
        $this->where = $where;

        return $this;
    }
164168
protected function prepareListFieldValue(array &$list)
    {
        foreach ($list as &$item) {
            $this->setItemThumb($item, $this->image, array('placeholder' => false));
        }
    }
235903
public function updateCMSFields(FieldList $fields) {
		$excluded = $this->owner->getExcludedSiteTreeClassNames();
		if(!empty($excluded)) {
			$pages = SiteTree::get()->filter(array(
				'ParentID' => $this->owner->ID,
				'ClassName' => $excluded
			));
			$gridField = new GridField(
				"ChildPages",
				$this->getLumberjackTitle(),
				$pages,
				GridFieldConfig_Lumberjack::create()
			);

			$tab = new Tab('ChildPages', $this->getLumberjackTitle(), $gridField);
			$fields->insertAfter($tab, 'Main');
		}
	}