Remove default owner for entity.

@return $this
8692
public function withoutDefaultOwner()
    {
        $this->defaultOwner = null;
        if (isset($this->withDefaultOwnerOnCreate)) {
            $this->withDefaultOwnerOnCreate = false;
        }

        return $this;
    }
238203
public function clearAction()
    {
        /** @var Request $request */
        $request = $this->getRequest();
        $managerName = $request->getParam('objectManager', 'doctrine.entitymanager.orm_default');

        $entityMapCache = $this->getEntityMapCache();
        $result = "Entity map not found\n";
        if ($entityMapCache->hasEntityMap($managerName)) {
            $entityMapCache->deleteEntityMap($managerName);
            $result = "Entity map clear\n";
        }

        return [
            ConsoleModel::RESULT => $result
        ];
    }
76624
public function removeFromList()
    {
        // Keep the list modification query for the save() transaction
        $this->sortableQueries[] = array(
            'callable'  => array('\CustomerGroup\Model\CustomerGroupQuery', 'sortableShiftRank'),
            'arguments' => array(-1, $this->getPosition() + 1, null)
        );
        // remove the object from the list
        $this->setPosition(null);


        return $this;
    }
1097469
public function clearConfig()
    {
        $this->setPercentage((integer) 0);
        $this->setUsers(array());
        $this->setRoles(array());
        $this->setGroups(array());
        return $this;
    }
7751
public function unregister()
    {
        $this->files->unregister();
        $this->psr0->unregister();
        $this->psr4->unregister();

        return $this;
    }
1097902
public function delete()
    {

        // Cleanup the user
        $this->login_history()->delete();
        $this->affiliations()->detach();
        $this->refresh_token()->forceDelete();

        $this->settings()->delete();

        return parent::delete();
    }
202940
public function remove(): self
    {
        if ($this->_parent) {
            $id = spl_object_hash($this);
            unset($this->_parent->_children[$id]);
            unset($this->_parent);
        }
        return $this;
    }
698286
public function reset() : self
    {
        $this->version = null;
        $this->resource = null;
        $this->id = null;
        $this->secure = false;
        $this->relationship = null;
        $this->relatedId = null;

        return $this;
    }
1206082
public function clear()
    {
        $this->_data                 = array();
        $this->__modified_properties = array();
        $this->setStatus(NULL);

        if ($this->isConnected()) {
            $this->_data = $this->getTable()->getDefaults();
        }

        return $this;
    }
977572
public function delete()
    {
        if (!$this->hasId()) {
            throw new DeleteException('ID not set - did you call find($id) before delete()?');
        }

        if (!$this->isDeletable()) {
            throw new DeleteException('Permission denied: Entity can not be deleted');
        }

        $this->transactional(function () {
            $this->forceDelete();
        });

        return $this;
    }
221887
public function delete() {
        if (!$this->isPersistent()) throw new IllegalStateException('Cannot delete non-persistent '.get_class($this));

        $this->dao()->transaction(function() {
            if ($this->beforeDelete() !== true)                             // pre-processing hook
                return $this;

            if ($this->doDelete()) {                                        // perform deletion
                // reset identity property
                $idName = $this->dao()->getMapping()['identity']['name'];
                $this->$idName = null;

                $this->afterDelete();                                       // post-processing hook
            }
        });
        return $this;
    }
846199
public function remove()
    {
        unset($this->_nodes[$this->_pointer]);
        $this->_nodes = array_values($this->_nodes);
        return $this;
    }
1311986
public function removeProperty($name)
    {
        if ($this->isConnected())
        {
            $column = $this->getTable()->getColumn($name);

            if (isset($column) && $column->required) {
                $this->setProperty($name, $column->default);
            }
            else
            {
                parent::offsetUnset($name);
                unset($this->_modified[$name]);
            }
        }

        return $this;
    }
530216
public function clear($entity)
    {
        /**
         * @var ObjectManager $objectManager
         */
        $objectManager = $this
            ->get('elcodi.provider.manager')
            ->getManagerByEntityNamespace(get_class($entity));

        $objectManager->clear($entity);

        return $this;
    }
176526
public function clearProperties() {
		foreach ($this->properties as $property) {
			$property->setParent(null);
		}
		$this->properties->clear();

		return $this;
	}
1028847
public function unsetInstanceOptions()
    {
        foreach (Core\Config::getDefaults() as $k => $v) {
            if (isset($this->$k)) {
                unset($this->$k);
            }
        }

        return $this;
    }
102639
public static function removeOwner($owner_id, $owner, $owner_attribute)
    {
        $mediafiles = Owners::findOne([
            'owner_id' => $owner_id,
            'owner' => $owner,
            'owner_attribute' => $owner_attribute,
        ]);

        if ($mediafiles) {
            return $mediafiles->delete();
        }

        return false;
    }