Remove message

@param \Sopinet\ChatBundle\Entity\Device $device
190520
public function removeDevice(\Sopinet\ChatBundle\Entity\Device $device)
    {
        $this->devices->removeElement($device);
    }
835990
public function removeNode(\Ydle\HubBundle\Entity\Node $node)
    {
        $this->nodes->removeElement($node);
    }
950299
public function removeCondition(\Sulu\Bundle\ResourceBundle\Entity\Condition $conditions)
    {
        $this->conditions->removeElement($conditions);
    }
434161
public function removeEmail(\Sulu\Bundle\ContactBundle\Entity\Email $emails)
    {
        $this->emails->removeElement($emails);
    }
1075250
public function remove($key)
    {
        if ($key == 'message') {
            $this->message = '';
        }

        if ($key == 'exception') {
            $this->exception = null;
        }

        if (array_key_exists($key, $this->payload)) {
            unset($this->payload[$key]);
        }
    }
1355968
def _delete_device_from_device_group(self, device):
        '''
        '''

        device_name = get_device_info(device).name
        dg = pollster(self._get_device_group)(device)
        device_to_remove = dg.devices_s.devices.load(
            name=device_name, partition=self.partition
        )
        device_to_remove.delete()
854336
public function deleteDeviceState($deviceName)
    {
        $uri = "deviceStates/$deviceName";
        try {
            $this->client->getEndpoint()->delete($uri);
        } catch (RequestException $e) {
            $this->processRequestException($e);
        }
    }
555365
public static void remove(String deviceName) {
        try {
            //	Get full device name (with tango host)
            String fullDeviceName = new TangoUrl(deviceName).toString();

            //	Check if already exists before remove.
            if (proxy_table.containsKey(fullDeviceName))
                proxy_table.remove(fullDeviceName);
        } catch (DevFailed e) {
            //	Not serious. Display only warning
            System.err.println(e.errors[0].desc);
        }
    }
727007
def delete_device(self, device_id):
        
        api = self._get_api(device_directory.DefaultApi)
        return api.device_destroy(id=device_id)
264315
public function setToDevice(\Sopinet\ChatBundle\Entity\Device $toDevice = null)
    {
        $this->toDevice = $toDevice;

        return $this;
    }
18751
public function removeDevices(int $groupId, array $deviceIdentifiers)
    {
        $params = [
            'group_id' => $groupId,
            'device_identifiers' => $deviceIdentifiers,
        ];

        return $this->httpPostJson('shakearound/device/group/deletedevice', $params);
    }
202059
private static function normalizeOS(Device $device)
    {
        if (strpos($device->getDeviceUa(), 'Windows') !== false) {
            if (preg_match('/Windows NT ([0-9]+?\.[0-9])/', $device->getOs()->name, $matches)) {
                $device->getOs()->name    = 'Windows';
                $device->getOs()->version = array_key_exists($matches[1], self::$windowsMap) ? self::$windowsMap[$matches[1]]
                    : $matches[1];

                return;
            }

            if (preg_match('/Windows [0-9\.]+/', $device->getOs()->name)) {
                return;
            }
        }

        if (strpos($device->getOs()->name, 'Windows Phone') !== false) {
            if (array_key_exists($device->getOs()->version, self::$wds_map)) {
                $device->getOs()->version = self::$wds_map[$device->getOs()->version];

                return;
            }
        }

        if ($device->getOs()->setRegex($device->getDeviceUa(), '/PPC.+OS X ([0-9\._]+)/', 'Mac OS X')) {
            $device->getOs()->version = str_replace('_', '.', $device->getOs()->version);

            return;
        }

        if ($device->getOs()->setRegex($device->getDeviceUa(), '/PPC.+OS X/', 'Mac OS X')) {
            return;
        }

        if ($device->getOs()->setRegex($device->getDeviceUa(), '/Intel Mac OS X ([0-9\._]+)/', 'Mac OS X', 1)) {
            $device->getOs()->version = str_replace('_', '.', $device->getOs()->version);

            return;
        }

        if ($device->getOs()->setContains($device->getDeviceUa(), 'Mac_PowerPC', 'Mac OS X')) {
            return;
        }

        if ($device->getOs()->setContains($device->getDeviceUa(), 'CrOS', 'Chrome OS')) {
            return;
        }

        if ($device->getOs()->name) {
            return;
        }

        if (strpos($device->getDeviceUa(), 'FreeBSD') !== false) {
            $device->getOs()->name = 'FreeBSD';

            return;
        }

        if (strpos($device->getDeviceUa(), 'NetBSD') !== false) {
            $device->getOs()->name = 'NetBSD';

            return;
        }

        // Last ditch efforts
        if (strpos($device->getDeviceUa(), 'Linux') !== false || strpos($device->getDeviceUa(), 'X11') !== false) {
            $device->getOs()->name = 'Linux';

            return;
        }
    }
140653
public function removeMedia(\Amulen\MediaBundle\Entity\Media $medias)
    {
        $this->medias->removeElement($medias);
    }
401845
public function removeLocation(\BlackForest\PiwikBundle\Entity\PiwikLocation $location)
    {
        return $this->location->removeElement($location);
    }
865768
public function removeFile(\Haven\CoreBundle\Entity\File\File $file)
    {
        $this->files->removeElement($file);
    }
150198
public function deleteMessage($key) {
		if(isset($this->msg[$key])) {
			unset($this->msg[$key]);
		}
		if(!$this->msg) {
			$this->deleteFile();
		}
	}
23163
public function removeNotation(\Innova\CollecticielBundle\Entity\Notation $notation)
    {
        $this->notations->removeElement($notation);
    }