Returns whether deletions should be confirmed by the user.

@return bool
541651
public function confirmDelete()
    {
        if (null === $this->confirm_delete) {
            return (bool) config('cms-models.defaults.confirm_delete', false);
        }

        return (bool) $this->confirm_delete;
    }
734688
public function delete()
	{
		$db = \App::get('db');

		if (!is_numeric($this->get('uidNumber')))
		{
			$this->setError("missing required field 'uidNumber'");
			return false;
		}

		$classvars = get_class_vars(__CLASS__);

		$affected = 0;

		foreach ($classvars as $property => $value)
		{
			if ('_auxv_' != substr($property, 0, 6) && '_auxs_' != substr($property, 0, 6))
			{
				continue;
			}

			$property = substr($property, 6);

			$query = "DELETE FROM `#__xprofiles_$property` WHERE uidNumber = " . $db->quote($this->get('uidNumber'));
			$db->setQuery($query);

			if (!$db->query())
			{
				$this->setError("Error deleting from xprofiles $property table: " . $db->getErrorMsg());
			}
			else
			{
				$affected += $db->getAffectedRows();
			}
		}

		$query = "DELETE FROM `#__xprofiles` WHERE uidNumber = " . $db->quote($this->get('uidNumber'));
		$db->setQuery($query);

		if (!$db->query())
		{
			$this->setError("Error deleting from xprofiles table: " . $db->getErrorMsg());
		}
		else
		{
			$affected += $db->getAffectedRows();
		}

		if ($affected > 0)
		{
			Event::trigger('user.onAfterDeleteProfile', array($this));
		}

		$this->clear();

		return true;
	}
265750
public function delete(): bool
    {
        $isSoftDeleted = array_key_exists('Illuminate\Database\Eloquent\SoftDeletes', class_uses($this));
        if ($this->exists && ! $isSoftDeleted) {
            $this->roles()->detach();
        }

        return parent::delete();
    }
1216936
public function isValid()
  {
    return ($this->checkUser() && $this->checkPass() && $this->checkHost() && $this->checkPort() && $this->checkPath() && $this->checkQuery() && $this->checkFragment());
  }
422056
public function isDatesValid()
    {
        if ($this->startDate >= $this->endDate) {
            return false;
        }

        return ($this->endDate->diff($this->startDate)->days > 0);
    }
637925
private function canValid() {
		if (class_exists('BetterButton'))
			return $this->form->buttonClicked() && $this->form->buttonClicked()->actionName()!="doDelete";
		else
			return true;
	}
486410
public function clear(): bool
    {
        if (!empty($this->tag)) {
            foreach ($this->tag as $tag) {
                $this->clearTag($tag);
            }
            return true;
        }

        $this->writeTimes++;

        $sql = 'DELETE FROM ' . $this->options['table'];

        sqlite_query($this->handler, $sql);

        return true;
    }
344008
public function validate()
    {
        $confirmationInput = $this->inputName.'_confirmation';

        if (isset($this->input[$confirmationInput]) &&
            $this->input[$confirmationInput] == $this->getValue()) {
            return true;
        }

        return false;
    }
136697
public function is_valid() {
        $ret = false ;

        if (parent::is_valid() === true) {
            if (is_null($this->id) === false && is_null($this->logicalConnectorWithNext) === false &&
                is_null($this->negation) === false && is_null($this->groupedWith) === false
            ) {
                $ret = true;
            }
        }

        return $ret;
    }
45461
public function isValid() {
		
		$file = $this -> getFile();

		$messages = [

			UPLOAD_ERR_FORM_SIZE 	=> 'File exceeds the maximum file size that was specified in the HTML form',
			UPLOAD_ERR_PARTIAL 		=> 'File was only partially uploaded',
			UPLOAD_ERR_NO_FILE		=> 'No file was uploaded',
			UPLOAD_ERR_NO_TMP_DIR	=> 'Missing a temporary folder',
			UPLOAD_ERR_CANT_WRITE	=> 'Failed to write file to disk',
			UPLOAD_ERR_EXTENSION	=> 'An extension stopped the file upload'
		];

		if(false === isset($messages[$file['error']])) {
			return true;
		}

		$this -> setMessage($messages[$file['error']]);

		return false;
	}
1235230
public function hasUnpersistedChanges()
    {
        $unitOfWork = $this->entityManager->getUnitOfWork();
        $unitOfWork->computeChangeSets();

        if ($unitOfWork->getScheduledEntityInsertions() !== []
            || $unitOfWork->getScheduledEntityUpdates() !== []
            || $unitOfWork->getScheduledEntityDeletions() !== []
            || $unitOfWork->getScheduledCollectionDeletions() !== []
            || $unitOfWork->getScheduledCollectionUpdates() !== []
        ) {
            return true;
        }

        return false;
    }
830146
public function isClean()
	{
		$status   = $this->status();
		$eligible = true;

		if (!empty($status) && is_array($status))
		{
			foreach ($status as $type => $files)
			{
				if ($type != 'untracked' && !empty($files))
				{
					$eligible = false;
					break;
				}
			}
		}

		return $eligible;
	}
14359
public function delete()
    {
        $this->getLogger()->info('Deleting resolution ID ' . $this->resolutionId);
        $this->doDelete('/resolution/' . $this->resolutionId);

        return true;
    }
1114387
public function delete ()
	{
		$this->before_delete();

		$statement = 'DELETE FROM ' . static::$table_name;

		$pk = $this->primary_key_condition();

		$statement .= ' WHERE ' . $pk->statement;

		$result = $this->db->query($statement, $pk->values->getArrayCopy(), 'multi', null, false);

		$this->stored = true;
		$this->updated = false;

		$this->after_delete();

		return true;
	}
803332
public function isDone()
    {
        return (is_null($this->lastProtoResponse) || is_null($this->lastProtoResponse->getDone()))
            ? false
            : $this->lastProtoResponse->getDone();
    }
214453
public function delete()
    {
        // we will NOT let you delete the admin user
        if ($this->getUserID() == USER_SUPER_ID) {
            return false;
        }

        // Dispatch an on_user_delete event, that every subscriber can cancel.
        $ue = new DeleteUserEvent($this);
        $ue = $this->getDirector()->dispatch('on_user_delete', $ue);
        if (!$ue->proceed()) {
            return false;
        }

        // Dispatch an on_user_deleted event: subscribers can't cancel this event.
        // This event could be at the end of this method, but let's keep it here so that subscribers
        // can get all the details of the user being deleted.
        $this->getDirector()->dispatch('on_user_deleted', new UserInfoEvent($this));

        $attributes = $this->attributeCategory->getAttributeValues($this->getEntityObject());
        foreach ($attributes as $attribute) {
            $this->attributeCategory->deleteValue($attribute);
        }

        $this->connection->executeQuery('DELETE FROM OauthUserMap WHERE user_id = ?', [(int) $this->getUserID()]);
        $this->connection->executeQuery('DELETE FROM Logs WHERE uID = ?', [(int) $this->getUserID()]);
        $this->connection->executeQuery('DELETE FROM UserSearchIndexAttributes WHERE uID = ?', [(int) $this->getUserID()]);
        $this->connection->executeQuery('DELETE FROM UserGroups WHERE uID = ?', [(int) $this->getUserID()]);
        $this->connection->executeQuery('DELETE FROM UserValidationHashes WHERE uID = ?', [(int) $this->getUserID()]);
        $this->connection->executeQuery('DELETE FROM Piles WHERE uID = ?', [(int) $this->getUserID()]);
        $this->connection->executeQuery('DELETE FROM ConfigStore WHERE uID = ?', [(int) $this->getUserID()]);
        $this->connection->executeQuery('DELETE FROM ConversationSubscriptions WHERE uID = ?', [(int) $this->getUserID()]);
        $this->connection->executeQuery('DELETE FROM PermissionAccessEntityUsers WHERE uID = ?', [(int) $this->getUserID()]);
        $this->connection->executeQuery('DELETE FROM authTypeConcreteCookieMap WHERE uID = ?', [(int) $this->getUserID()]);

        // Conversation messages and ratings should be detached from the user
        $this->connection->executeQuery('UPDATE ConversationMessages SET uID = 0, cnvMessageAuthorName = NULL, cnvMessageAuthorEmail = NULL, cnvMessageAuthorWebsite = NULL, cnvMessageSubmitIP = NULL, cnvMessageSubmitUserAgent = NULL WHERE uID = ?', [(int) $this->getUserID()]);
        $this->connection->executeQuery('UPDATE ConversationMessageRatings SET cnvMessageRatingIP = NULL, uID = 0 WHERE uID = ?', [(int) $this->getUserID()]);

        // Public file sets should be detached from the user
        $this->connection->executeQuery('UPDATE FileSets SET uID = 0 WHERE uID = ? AND fsType = ?', [
            (int) $this->getUserID(),
            \Concrete\Core\File\Set\Set::TYPE_PUBLIC,
        ]);

        // Delete private file sets from this user
        foreach (\Concrete\Core\File\Set\Set::getOwnedSets($this) as $set) {
            $set->delete();
        }



        $this->connection->executeQuery('UPDATE Blocks set uID = ? WHERE uID = ?', [(int) USER_SUPER_ID, (int) $this->getUserID()]);
        $this->connection->executeQuery('UPDATE Pages set uID = ? WHERE uID = ?', [(int) USER_SUPER_ID, (int) $this->getUserID()]);
        $this->connection->executeQuery('UPDATE DownloadStatistics set uID = 0 WHERE uID = ?', [(int) $this->getUserID()]);

        // We need to clear out the doctrine proxies for userSignups or we will get a Doctrine Error
        /** @var \Concrete\Core\Entity\User\UserSignup[] $userSignups */
        $userSignups = $this->entityManager->getRepository(\Concrete\Core\Entity\User\UserSignup::class)->findBy(['createdBy'=>(int) $this->getUserID()]);
        $superAdminEntity = $this->entityManager->getRepository(UserEntity::class)->find((int) USER_SUPER_ID);

        foreach ($userSignups as $userSignup) {
            // If there is no SuperAdmin Just remove the relatedUserSignups
            if (is_object($superAdminEntity)) {
                $userSignup->setCreatedBy($superAdminEntity);
                $this->entityManager->persist($userSignup);
            } else {
                $this->entityManager->remove($userSignup);
            }

        }

        $this->entityManager->remove($this->entity);
        $this->entityManager->flush();

        return true;
    }
1207001
public function beforeDelete()
    {
        if (parent::beforeDelete()) {
            $idCardPath = $this->getIdCardPath($this->user_id);
            if (file_exists($idCardPath . '_passport_cover_image.jpg')) {
                @unlink($idCardPath . '_passport_cover_image.jpg');
            }
            if (file_exists($idCardPath . '_passport_person_page_image.jpg')) {
                @unlink($idCardPath . '_passport_person_page_image.jpg');
            }
            if (file_exists($idCardPath . '_passport_self_holding_image.jpg')) {
                @unlink($idCardPath . '_passport_self_holding_image.jpg');
            }
            return true;
        } else {
            return false;
        }
    }