remove field where type==$type from field list and button container
@param $type
@return $this
328935
public function removeType($type)
    {
        foreach ($this->fields as $fieldname => $field) {
            if ($field->type == $type) {
                unset($this->fields[$fieldname]);
            }
        }
        foreach ($this->button_container as $container => $buttons) {
            foreach ($buttons as $key=>$button) {
                if (strpos($button, 'type="'.$type.'"')!==false) {
                    $this->button_container[$container][$key] = "";
                }
            }
        }

        return $this;
    }
1216735
public function type($type)
    {
        $types = is_array($type) ? $type : func_get_args();

        $this->types = array_merge($this->types, $types);

        return $this;
    }
585140
public function setType($type)
    {
        if (! in_array($type, self::$types, true)) {
            throw new InvalidArgumentException(sprintf(
                '"%s" is not a valid type! Valid types: %s',
                $type,
                implode(', ', self::$types)
            ));
        }

        $this->type = $type;

        return $this;
    }
325613
public function setType(Type $type)
    {
        if ($this->type !== $type) {
            $this->type = $type;
            $type->setItem($this);
        }

        return $this;
    }
297663
public function setType($type)
    {
        if ($type === null) {
            $type = self::TYPE_UNDEFINED;
        }

        $this->type = $type;

        return $this;
    }
747894
public function type($type)
    {
        $type = strtoupper($type);
        if (!in_array($type, ['CURL', 'SOCKET', 'FILE'])) {
            $type = 'CURL';
        }
        $this->def['type'] = $type;
        return $this;
    }
1146598
public function clear($type = FALSE)
  {
    
	if ($type === FALSE){
		
		$this->_session_unset();
	}
	else {
		
		$messages = $this->_session_get();
		
		if (is_array($messages))
		{		
			foreach($messages as $i=>$message){
			
				if ($message->type == $type){
					
					unset($messages[$i]);
				}
			}
			
			if (!$this->count())
			{
				$this->clear();
			}
			else {
			
				$this->_session_set($messages);
			}
		}
	}
	
    return $this;
  }
1040476
protected function removeAllItems($type) {
        $names = [];
        $query = (new Query)
            ->select(['name'])
            ->from($this->itemTable)
            ->where(['type' => $type]);
        foreach ($query->all($this->db) as $row) {
            $names[] = $row['name'];
        }

        if (empty($names)) {
            return;
        }
        $key = $type == Item::TYPE_PERMISSION ? 'child' : 'parent';
        $this->db->getCollection($this->itemChildTable)->remove([$key => $names]);
        $this->db->getCollection($this->assignmentTable)->remove(['item_name' => $names]);
        $this->db->getCollection($this->itemTable)->remove(['type' => $type]);
    }
673207
public function clear($type = null)
    {
        if (is_null($type)) {
            $_SESSION[$this->key] = [];
        } else {
            unset($_SESSION[$this->key][$type]);
        }

        return $this;
    }
926360
public function setType($type)
    {
        $this->type = $type;

        switch ($type) {
            case 'text':
            case 'string':
                $this->operatorOpts = ['equals', 'notequals', 'contains'];
                break;
            case 'integer':
                $this->operatorOpts = ['equals', 'notequals', 'greaterthan', 'lessthan'];
                break;
            case 'boolean':
                $this->operatorOpts = ['equals'];
                break;
        }

        return $this;
    }
798687
public function clear($type = null)
    {
        if (is_null($type)) {
            $this->notifications = new Collection();
        } else {
            $notifications = new Collection();

            foreach ($this->notifications as $message) {
                if ($message->getType() != $type) {
                    $notifications->add($message);
                }
            }

            $this->notifications = $notifications;
        }

        return $this;
    }
466441
public function type($type)
    {
        $type = strtoupper($type);

        if (!in_array($type, ['INSERT', 'INSERT IGNORE', 'REPLACE'])) {
            throw new \UnexpectedValueException('Invalid insert type');
        }

        $this->type = $type;

        return $this;
    }
849556
public function registerAsSingleton(string $type): self
    {
        $this->typeDefinition->register($type, true);
        return $this;
    }
339839
public function setModeInput(string $type): Bootstrap4Button
    {
        $this->mode = 'input';
        if (in_array($type, array('button', 'submit', 'reset')) === true) {
            $this->input_type = $type;
        } else {
            $this->input_type = 'button';
        }

        return $this;
    }
1095423
public function setType( $type )
    {
        $this->type = is_int( $type ) ? $type : self::getStorableType( $type );
        return $this;
    }
1115012
public function setType($type = '') {
        if (!\in_array($type, self::$allowed_input_types, true)) {
            throw new InvalidArgumentException('Unsupported column input type. Possible are: ' . implode(', ', self::$allowed_input_types));
        }

        $this->selected_input_type = $type;

        // Update some params based on type
        switch ($this->selected_input_type) {
            case 'checkbox': case 'radio': case 'delete':
                $this->setWidth('1%');
                $this->disableNewlines();
                $this->enableCenterAlign();
            break;
        }

        return $this;
    }
950441
public function setType($type)
    {
        if (!in_array($type, self::TYPES)) {
            throw new \InvalidArgumentException("bad type {$type}");
        }
        $this->type = $type;

        return $this;
    }