Similar to writeable, but no new items can be created.
@param bool $create
@param bool $edit
@return $this
490388
public function linkable($create = true, $edit = true)
    {
        $this->linkOnly = true;
        parent::writeable($create, $edit);
        return $this;
    }
151784
public function lock( $value = true )
	{
		$this->lock = $value;

		if ( $this->lock )
		{
			$this->useWritePdo();
		}

		return $this;
	}
1304696
protected function createFile(string $sPath, string $sContents = ''): BaseMaker
    {
        $hHandle = fopen($sPath, 'w');
        if (!$hHandle) {
            throw new DoesNotExistException('Failed to open ' . $sPath . ' for writing');
        }

        if (fwrite($hHandle, $sContents) === false) {
            throw new IsNotWritableException('Failed to write to ' . $sPath);
        }

        fclose($hHandle);

        return $this;
    }
468176
public function createForm(bool $edit = false): array
    {
        if (!$this->sourceId || !$this->sourceType || !$this->resourceId) {
            throw new \Exception('source_id, source_type and resource_id are required');
        }

        $form = [
            'storageUrl' => route('admin.api.resource.grab.property'),
            'buttons' => [
                'submit' => [
                    'label' => $this->getSubmitLabel($edit),
                ],
            ],
            'structure' => $this->getStructure($edit),
        ];

        if ($this->multiLanguage) {
            $form['availableLanguages'] = getHCContentLanguages();
        }

        return $form;
    }
1192141
protected function editable()
    {
        if (array_key_exists('editable', $this->attributes) && $this->attributes['editable'] == false) {
            return false;
        }
        return in_array('form', get_class_methods($this));
    }
16836
public function isUpdate($update = true, $where = null)
    {
        if (is_bool($update)) {
            $this->exists = $update;

            if (!empty($where)) {
                $this->updateWhere = $where;
            }
        } else {
            $this->exists      = true;
            $this->updateWhere = $update;
        }

        return $this;
    }
225619
public function applyEditSettings($create = false)
    {
        $this->applyDetailSettings();

        reset($this->filterOptions);
        $default = key($this->filterOptions);
        $this->set('gaf_class',         'default', $default, 'onchange', 'this.form.submit();');

        // gaf_id is not needed for some validators
        $this->set('gaf_id',            'elementClass', 'Hidden');

        $this->set('gaf_calc_name',     'elementClass', 'Exhibitor');
        $this->setOnSave('gaf_calc_name', array($this, 'calcultateName'));
        $this->set('gaf_active',        'elementClass', 'Checkbox');

        if ($create) {
            $default = $this->db->fetchOne("SELECT MAX(gaf_id_order) FROM gems__appointment_filters");
            $this->set('gaf_id_order', 'default', intval($default) + 10);
        }

        return $this;
    }
120882
public static function create_from_submission(\assign $assign, \stdClass $submission, $editable) {
        global $USER;

        $data = array(
            'context' => $assign->get_context(),
            'objectid' => $submission->id,
            'other' => array(
                'submission_editable' => $editable,
            ),
        );
        if (!empty($submission->userid) && ($submission->userid != $USER->id)) {
            $data['relateduserid'] = $submission->userid;
        }
        /** @var assessable_submitted $event */
        $event = self::create($data);
        $event->set_assign($assign);
        $event->add_record_snapshot('assign_submission', $submission);
        return $event;
    }
666633
public function save($item, bool $update = false)
    {
        return Craft::$app->globals->saveSet($item);
    }
1097295
def set_current_editor(self, editor, update):
        """"""
        editor_id = editor.get_id()
        if editor_id in list(self.editor_ids.values()):
            item = self.editor_items[editor_id]
            if not self.freeze:
                self.scrollToItem(item)
                self.root_item_selected(item)
                self.__hide_or_show_root_items(item)
            if update:
                self.save_expanded_state()
                tree_cache = self.editor_tree_cache[editor_id]
                self.populate_branch(editor, item, tree_cache)
                self.restore_expanded_state()
        else:
            root_item = FileRootItem(editor.fname, self, editor.is_python())
            root_item.set_text(fullpath=self.show_fullpath)
            tree_cache = self.populate_branch(editor, root_item)
            self.__hide_or_show_root_items(root_item)
            self.root_item_selected(root_item)
            self.editor_items[editor_id] = root_item
            self.editor_tree_cache[editor_id] = tree_cache
            self.resizeColumnToContents(0)
        if editor not in self.editor_ids:
            self.editor_ids[editor] = editor_id
            self.ordered_editor_ids.append(editor_id)
            self.__sort_toplevel_items()
        self.current_editor = editor
941578
public function setChecked(bool $checked = true) : FormElement
    {
        if (true === $checked) {
            $this->attributes['checked'] = 'checked';
        } else {
            unset($this->attributes['checked']);
        }
        return $this;
    }
876343
public function setGenerateDocblock(bool $generate) {
		$this->options['generateDocblock'] = $generate;
		if (!$generate) {
			$this->options['generateEmptyDocblock'] = $generate;
		}
		return $this;
	}
267688
function preSave($create = false)
    {
        if ($this->isAnonymous()) {
            $this->creation_dtime = gmdate('Y-m-d H:i:s');
        }
        $this->modif_dtime = gmdate('Y-m-d H:i:s');
    }
967763
public function save($item, bool $update = false)
    {
        /** @var User $item */
        return Craft::$app->getElements()->saveElement($item);
    }
1138912
function canCreate( )
    {
        if ( !isset( $this->Permissions["can_create"] ) )
        {
            $this->Permissions["can_create"] = $this->checkAccess( 'create' );
        }
        return ( $this->Permissions["can_create"] == 1 );
    }
361932
public function createForm (bool $edit = false)
    {
        $form = [
            'storageURL' => route ('auth.register'),
            'buttons'    => [
                [
                    "class" => "col-centered",
                    "label" => trans ('HCTranslations::core.buttons.register'),
                    "type"  => "submit",
                ],
            ],
            'structure'  => [
                [
                    "type"            => "singleLine",
                    "fieldID"         => "email",
                    "label"           => trans ("HCACL::users.email"),
                    "required"        => 1,
                    "requiredVisible" => 1,
                ], [
                    "type"            => "password",
                    "fieldID"         => "password",
                    "label"           => trans ("HCACL::users.register.password"),
                    "required"        => 1,
                    "requiredVisible" => 1,
                ],
            ],
        ];

        return $form;
    }
1122753
public function createEditForm($id) {
        $entity = $this->read_handler->get($id);
        $edit_form = $this->form_factory->create(new Type(), $entity);

        return $edit_form;
    }