Asserts that a given content type is editable.

@Then I should be able to edit a/an :type( content)
172212
public function assertEditNodeOfType($type)
    {
        $node = (object) array(
        'type' => $type,
        'title' => "Test $type",
        );
        $saved = $this->nodeCreate($node);

        // Set internal browser on the node edit page.
        $this->getSession()->visit($this->locatePath('/node/' . $saved->nid . '/edit'));

        // Test status.
        $this->assertSession()->statusCodeEquals('200');
    }
615420
private function isValidContentType(string $contentType): void
    {
        $allowedContentType = $this->getAllowedContentType();
        if (!\in_array($contentType, $allowedContentType, true)) {
            throw new InvalidTypeException('Invalid content type.');
        }
    }
250362
public boolean isTextContentType(String contentType) {
        if (contentType != null) {
            String lowerContentType = contentType.toLowerCase();
            for (String textContentType : this.parsableContentTypes) {
                if (lowerContentType.startsWith(textContentType)) {
                    return true;
                }
            }
        }
        return false;
    }
66415
function _toggleIndentType() {
        var current = EditorManager.getActiveEditor(),
            fullPath = current && current.document.file.fullPath;

        Editor.setUseTabChar(!Editor.getUseTabChar(fullPath), fullPath);
        _updateIndentType(fullPath);
        _updateIndentSize(fullPath);
    }
1366394
def _can_parse(self, content_type):
        ''''''
        content_type, content_subtype, content_param = utils.parse_media_type(content_type)
        for accepted in self.headers.get('Accept', self.DEFAULT_CONTENT_TYPE).split(','):
            type, subtype, param = utils.parse_media_type(accepted)
            # if either accepted_type or content_type do not
            # contain a parameter section, then it will be
            # optimistically ignored
            matched = (type == content_type) \
                      and (subtype == content_subtype) \
                      and (param == content_param or not (param and content_param))
            if matched:
                return True
        return False
379823
function contentTypeHeader(type) {
    if (this._res.headersSent) return this.debug(
      'Headers already sent, ignoring content type change: %s', contentTypes[type]
    );

    this.contentType = contentTypes[type];
    this._res.setHeader('Content-Type', this.contentType);
  }
1324129
void checkAccessibleType(Env<AttrContext> env, Type t) {
        accessibilityChecker.visit(t, env);
    }
437643
def enableEditing(self, editable=True):
        
        self.editable = editable
        self._columnDtypeModel.setEditable(self.editable)
60173
function assertType (value, type) {
  var valid;
  var expectedType = getType(type);
  if (expectedType === 'String') {
    valid = typeof value === (expectedType = 'string');
  } else if (expectedType === 'Number') {
    valid = typeof value === (expectedType = 'number');
  } else if (expectedType === 'Boolean') {
    valid = typeof value === (expectedType = 'boolean');
  } else if (expectedType === 'Function') {
    valid = typeof value === (expectedType = 'function');
  } else if (expectedType === 'Object') {
    valid = isPlainObject(value);
  } else if (expectedType === 'Array') {
    valid = Array.isArray(value);
  } else {
    valid = value instanceof type;
  }
  return {
    valid: valid,
    expectedType: expectedType
  }
}
279247
def assert_type(value)
      unless @type.nil? || value.is_a?(@type) || allow_nil && value.nil?
        raise TypeError, format("Expected %s, got %s", @type, value.class)
      end
    end
820401
function isEditable() {
        if($this->managed) {
            return false;
        }
        
        $member = $this->guild->me;
        if(!$member->permissions->has(\CharlotteDunois\Yasmin\Models\Permissions::PERMISSIONS['MANAGE_ROLES'])) {
            return false;
        }
        
        return ($member->getHighestRole()->comparePositionTo($this) > 0);
    }
89899
public static void styleEditable(@NonNull Context ctx, @NonNull Editable editable) {
        styleEditable(ctx, null, editable, null, null);
    }
262410
def can_edit(self, user=None, request=None):
        
        can = False
        if request and not self.owner:
            if (getattr(settings, "UMAP_ALLOW_ANONYMOUS", False)
                    and self.is_anonymous_owner(request)):
                can = True
        if self.edit_status == self.ANONYMOUS:
            can = True
        elif not user.is_authenticated:
            pass
        elif user == self.owner:
            can = True
        elif self.edit_status == self.EDITORS and user in self.editors.all():
            can = True
        return can
84609
def set!(*args)
      msg = '#set! does not support special keys, use #set instead'
      raise ArgumentError, msg if args.any? { |v| v.is_a?(::Symbol) }

      input_value = args.join
      set input_value[0]
      return content_editable_set!(*args) if @content_editable

      element_call { execute_js(:setValue, @element, input_value[0..-2]) }
      append(input_value[-1])
      return if value == input_value

      raise Exception::Error, "#set! value: '#{value}' does not match expected input: '#{input_value}'"
    end
655416
function(oOverlay) {
			return {
				asSibling: this._isEditableCheck.call(this, oOverlay, true),
				asChild: this._isEditableCheck.call(this, oOverlay, false)
			};
		}
551827
function getNestedEditableIn( editablesContainer, remainingEditables ) {
		if ( remainingEditables == null )
			remainingEditables = findNestedEditables( editablesContainer );

		var editable;

		while ( ( editable = remainingEditables.shift() ) ) {
			if ( isIterableEditable( editable ) )
				return { element: editable, remaining: remainingEditables };
		}

		return null;
	}
1159275
protected boolean isEditable() {

        if (m_isEditable == null) {

            if (getCms().getRequestContext().getCurrentProject().isOnlineProject()
                || !getCms().isInsideCurrentProject(getParamResource())) {
                // we are in the online project or resource does not belong to project, no editing allowed
                m_isEditable = Boolean.FALSE;

            } else {
                // we are in an offline project

                // check permissions
                if (!checkResourcePermissions(CmsPermissionSet.ACCESS_WRITE, false)) {
                    getSettings().setErrorMessage(null);
                    m_isEditable = Boolean.FALSE;
                    return m_isEditable.booleanValue();
                }

                // check lock state
                String resourceName = getParamResource();
                CmsResource file = null;
                CmsLock lock = null;
                try {
                    file = getCms().readResource(resourceName, CmsResourceFilter.ALL);
                    // check if resource is a folder
                    if (file.isFolder() && !resourceName.endsWith("/")) {
                        resourceName += "/";
                    }
                } catch (CmsException e) {
                    // should usually never happen
                    if (LOG.isInfoEnabled()) {
                        LOG.info(e.getLocalizedMessage());
                    }
                }

                try {
                    // get the lock for the resource
                    lock = getCms().getLock(file);
                } catch (CmsException e) {
                    lock = CmsLock.getNullLock();

                    if (LOG.isErrorEnabled()) {
                        LOG.error(e.getLocalizedMessage(), e);
                    }
                }

                if (!lock.isNullLock()) {
                    // determine if resource is editable...
                    if (lock.isDirectlyOwnedBy(getCms().getRequestContext().getCurrentUser())) {
                        // lock is exclusive and belongs to the current user
                        if (lock.isInProject(getCms().getRequestContext().getCurrentProject())
                            || Boolean.valueOf(getParamUsetempfileproject()).booleanValue()) {
                            // resource is locked in the current project or the tempfileproject is used
                            m_isEditable = Boolean.TRUE;
                            return m_isEditable.booleanValue();
                        }
                    }
                } else if (OpenCms.getWorkplaceManager().autoLockResources()) {
                    if ((file == null) || file.isFolder()) {
                        // check locked resources in folder
                        try {
                            List<String> lockedResources = getCms().getLockedResources(
                                resourceName,
                                CmsLockFilter.FILTER_ALL.filterNotOwnedByUserId(
                                    getCms().getRequestContext().getCurrentUser().getId()));
                            if (!lockedResources.isEmpty()) {
                                m_isEditable = Boolean.FALSE;
                                return m_isEditable.booleanValue();
                            }
                        } catch (CmsException e1) {
                            // should usually never happen
                            if (LOG.isErrorEnabled()) {
                                LOG.error(e1.getLocalizedMessage(), e1);
                            }
                        }
                    }
                    m_isEditable = Boolean.TRUE;
                    return m_isEditable.booleanValue();
                }
                // lock is null or belongs to other user and/or project, properties are not editable
                m_isEditable = Boolean.FALSE;
            }
        }
        return m_isEditable.booleanValue();
    }