Update is anchor attribute (hidden frontend input, null source model, enabled by default).

@param \Magento\Eav\Setup\EavSetup $eavSetup EAV module Setup

@return void
337716
public function updateCategoryIsAnchorAttribute($eavSetup)
    {
        $eavSetup->updateAttribute(Category::ENTITY, 'is_anchor', 'frontend_input', 'hidden');
        $eavSetup->updateAttribute(Category::ENTITY, 'is_anchor', 'source_model', null);
        $categoryTreeRootId = \Magento\Catalog\Model\Category::TREE_ROOT_ID;
        $this->updateCategoryAttributeDefaultValue($eavSetup, Category::ENTITY, 'is_anchor', 1, [$categoryTreeRootId]);
    }
851609
public function setAddBaseDN($add_base_dn) {
		if(!empty($add_base_dn)) {
			$this->add_base_dn = $add_base_dn;
		}
		else
		{
			$this->add_base_dn = $this->basedn;
		}
	}
786256
public function setAccessKey( $accessKey ) {
		$accessKey = is_string( $accessKey ) && strlen( $accessKey ) ? $accessKey : null;

		if ( $this->accessKey !== $accessKey ) {
			if ( $accessKey !== null ) {
				$this->accessKeyed->setAttributes( [ 'accesskey' => $accessKey ] );
			} else {
				$this->accessKeyed->removeAttributes( [ 'accesskey' ] );
			}
			$this->accessKey = $accessKey;

			// Only if this is a TitledElement
			if ( method_exists( $this, 'updateTitle' ) ) {
				$this->updateTitle();
			}
		}

		return $this;
	}
111216
public function setIp($attribute)
    {
        $this->owner->updateAttributes(array_fill_keys((array)$attribute, $this->getValue(null)));
    }
1246050
public function setAttribute() : void
    {
        $last = $this->scope->getLastChild(); // Get the last inserted node
        $this->scope->removeLastChild(); // Remove it
        $this->scope->setAttribute($last);
    }
1315852
public function setAttrs($attrs)
	{
		if(is_array($attrs))
		{
			$this->data = $attrs;
		}
		foreach($this->attrsDefault as $key=>$value)
		{
			if(null===$this->get($key,null))
			{
				$this->set($key,$value);
			}
		}
	}
69447
protected function updateSettings()
    {
        $this->controlAccess('settings_edit');

        foreach ($this->getSubmitted() as $key => $value) {
            $this->config->set($key, $value);
        }

        $this->redirect('', $this->text('Settings have been updated'), 'success');
    }
1074293
public function beforeUpdate()
    {
        // prevent save empty image name value and also for correct remove old image
        $this->owner->setAttribute($this->imageAttribute, $this->owner->getOldAttribute($this->imageAttribute));
    }
1114991
public function setPopupAttributes($variation=NULL, $popupEvent=NULL) {
		if (isset($this->_popup))
			$this->_popup->setAttributes($variation, $popupEvent);
	}
778686
public function upgradeDatabase()
    {
        $this->refreshEntities([
            'Concrete\Core\Entity\Attribute\Key\Settings\BooleanSettings',
        ]);
        $em = $this->connection->getEntityManager();
        $ak = CollectionKey::getByHandle('exclude_nav');
        if ($ak) {
            $settings = $ak->getController()->getAttributeKeySettings();
            if ($settings) {
                $settings->setCheckboxLabel('Exclude Page from Navigation');
                $settings->setAttributeKey($ak);
                $em->persist($settings);
            }
        }
        $ak = CollectionKey::getByHandle('exclude_page_list');
        if ($ak) {
            $settings = $ak->getController()->getAttributeKeySettings();
            if ($settings) {
                $settings->setCheckboxLabel('Exclude Page from Page List Blocks');
                $settings->setAttributeKey($ak);
                $em->persist($settings);
            }
        }
        $ak = CollectionKey::getByHandle('is_featured');
        if ($ak) {
            $settings = $ak->getController()->getAttributeKeySettings();
            if ($settings) {
                $settings->setCheckboxLabel('Feature this Page');
                $settings->setAttributeKey($ak);
                $em->persist($settings);
            }
        }
        $em->flush();
    }
1120697
public function setSource($source)
    {
        $sourceAttribute = $this->sourceAttribute;
        return (is_string($sourceAttribute) && !empty($sourceAttribute)) ? $this->$sourceAttribute = $source : null;
    }
1260584
public function updateAcsfSites($site, $target_env) {
    $this->say("Running updates for site <comment>$site</comment> in environment <comment>$target_env</comment>.");
    $this->switchSiteContext($site);
    $this->invokeCommand('artifact:update:drupal');
  }
765391
public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        $setup->startSetup();

        $setup->getConnection()->addColumn(
            $setup->getTable('quote'),
            'bolt_parent_quote_id',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
                'nullable' => true,
                'default' => null,
                'unsigned' => true,
                'comment' => 'Original Quote ID'
            ]
        );

        $setup->getConnection()->addColumn(
            $setup->getTable('quote'),
            'bolt_reserved_order_id',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                'length' => 64,
                'nullable' => true,
                'comment' => 'Bolt Reserved Order Id'
            ]
        );

        $setup->getConnection()->addIndex(
            $setup->getTable('quote'),
            $setup->getIdxName('quote', ['bolt_parent_quote_id']),
            ['bolt_parent_quote_id']
        );

        $setup->endSetup();
    }
419644
protected function performAdditionalUpdateAction($updateEvent)
    {
        $attr_values = $this->getRequest()->get('attribute_values', null);

        if ($attr_values !== null) {
            foreach ($attr_values as $id => $value) {
                $event = new AttributeAvUpdateEvent($id);

                $event->setTitle($value);
                $event->setLocale($this->getCurrentEditionLocale());

                $this->dispatch(TheliaEvents::ATTRIBUTE_AV_UPDATE, $event);
            }
        }

        return null;
    }
501765
public function set_source($source) {
        $filerecord = new stdClass;
        $filerecord->source = $source;
        $this->update($filerecord);
    }
228303
public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        $setup->startSetup();

        if (version_compare($context->getVersion(), "1.1.0") < 0) {
            $setup->startSetup();

            $logTable = $setup->getConnection()->newTable($setup->getTable('elasticsuite_tracker_log_event'))
                ->addColumn(
                    'event_id',
                    \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                    '32',
                    ['nullable' => false, 'primary' => true],
                    'Event Id'
                )
                ->addColumn(
                    'date',
                    \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP,
                    null,
                    ['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT],
                    'Event date'
                )
                ->addColumn(
                    'data',
                    \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                    '2M',
                    ['nullable' => false],
                    'Event data'
                )
                ->addColumn(
                    'data',
                    \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                    '2M',
                    ['nullable' => false],
                    'Event data'
                );

            $setup->getConnection()->createTable($logTable);
        }

        if (version_compare($context->getVersion(), '1.2.0', '<')) {
            $this->createCustomerLinkTable($setup);
        }

        $setup->endSetup();
    }
1231144
public function updating(Eloquent $model): void
    {
        $original = $model->getOriginal('name');
        $current = $model->getAttribute('name');

        if ($this->isRestoringModel($model)) {
            $this->acl->addRole($current);
        } else {
            $this->acl->renameRole($original, $current);
        }
    }