Deletes a template
@return void
18014
public function onDelete()
    {
        $this->validateRequestTheme();

        $type = Request::input('templateType');

        $this->loadTemplate($type, trim(Request::input('templatePath')))->delete();

        /*
         * Extensibility - documented above
         */
        $this->fireSystemEvent('cms.template.delete', [$type]);
    }
869342
public function delete() {
        $sql = $this->grammar()->compileDelete($this);
        return $this->command()
            ->delete($sql, $this->getBindings());
    }
449773
public function deleteStyleAction()
    {
        $translator = $this->getServiceLocator()->get('translator');

        $eventDatas = array();
        $this->getEventManager()->trigger('meliscms_style_delete_start', $this, $eventDatas);

        $request = $this->getRequest();
        $templateId = null;
        $status  = 0;
        $message = 'no data';
        $textMessage = 'tr_meliscms_tool_styles_delete_fail';
        $textTitle = 'tr_meliscms_tool_styles';
        // make sure it's a POST call
        if($request->isPost()) {

            // get the service for Templates Model & Table
            $tableStyle = $this->getServiceLocator()->get('MelisEngineTableStyle');
            $styleId = (int) $request->getPost('styleId');

            // make sure our ID is not empty
            if(!empty($styleId))
            {
                $tableStyle->deleteById($styleId);
                $status = 1;
                $textMessage = 'tr_meliscms_tool_styles_delete_success';
            }
        }

        $response = array(
            'success' => $status ,
            'textTitle' => $textTitle,
            'textMessage' => $textMessage
        );

        $this->getEventManager()->trigger('meliscms_style_delete_end', $this, array_merge($response, array('typeCode' => 'CMS_STYLE_DELETE', 'itemId' => $styleId)));

        return new JsonModel($response);
    }
70968
public function removeTemplate($name)
    {
        if (isset($this->templates[$name])) {
            unset($this->templates[$name]);
        }

        return $this;
    }
1020649
public function onAfterDelete() {
		parent::onAfterDelete();
		// Create a basic new environment config from a template
		if($this->config()->get('allow_web_editing') && $this->envFileExists()) {
			unlink($this->getConfigFilename());
		}
	}
811849
public function delete()
    {
        $this->brokenOnDelete = true;
        $this->onBeforeDelete();
        if ($this->brokenOnDelete) {
            user_error("$this->class has a broken onBeforeDelete() function."
            . " Make sure that you call parent::onBeforeDelete().", E_USER_ERROR);
        }

        $path = $this->getFullPath();
        if (file_exists($path)) {
            unlink($path);
        }
        if ($this->storeRecord) {
            $this->storeRecord->delete();
        }

        $this->flushCache();
        $this->onAfterDelete();
    }
733434
public function delete() {
        global $DB;

        $this->delete_attachments();
        $this->remove_associations();

        // Get record to pass onto the event.
        $record = $DB->get_record('post', array('id' => $this->id));
        $DB->delete_records('post', array('id' => $this->id));
        core_tag_tag::remove_all_item_tags('core', 'post', $this->id);

        $event = \core\event\blog_entry_deleted::create(array(
            'objectid'      => $this->id,
            'relateduserid' => $this->userid
            ));
        $event->add_record_snapshot("post", $record);
        $event->set_blog_entry($this);
        $event->trigger();
    }
519904
public function deleteTemplateAction(IncidentTemplate $template)
    {
        $template->delete();

        return cachet_redirect('dashboard.templates')
            ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.incidents.templates.delete.success')));
    }
829469
public function delete()
    {
        $app = Application::getFacadeApplication();
        $db = $app->make(Connection::class);
        $db->delete('BlockTypeSetBlockTypes', ['btsID' => $this->getBlockTypeSetID()]);
        $db->delete('BlockTypeSets', ['btsID' => $this->getBlockTypeSetID()]);
    }
923129
public function delete()
    {
        foreach (array_keys($this->data) as $key) {

            unset($this->data[$key]);

        }

        foreach (array_keys($this->flash) as $key) {

            unset($this->flash[$key]);

        }
    }
1020592
def delete_template(template_disk)
      Log.debug "deleting template #{template_disk}"
      template = File.join(@templates_dir, File.basename(template_disk))
      template_flat = File.join(@templates_dir, File.basename(template_disk, ".vmdk") + "-flat.vmdk")
      Net::SSH.start(@address, @user, :password => @password) do |ssh|
        if (ssh.exec! "ls #{template} 2>/dev/null").nil?
          Log.error "Template #{template_disk} does not exist"
          raise "Template does not exist"
        end
        ssh.exec!("rm -f #{template} && rm -f #{template_flat} 2>&1")
      end
    end
1197375
function (template) {
	if (template.attachments) {
		this.attachments = getCompiledArr( template.attachments );
	} else {
		this.attachments = [];
	}
	delete template.attachments;
	delete template.attachment;
	this.src = template;
	this.compiled = getCompiledObj( this.src );
}
800138
public function deleteAuthItems() {
        foreach($this->privileges as $privilege) {
            $this->delete(
                'AuthItem',"name = '".$privilege.'::'.$this->getController()."'"
            );
        }
    }
1009034
public function delete()
    {
		        
		Event::trigger(EVENT_CORE_MATH_DELETE, ['material' => $this , 'message' => $this->getBoUrl()]);
		
        parent::delete();
        
        $this->updateCache();
    }
837225
function reset()
    {
        $this->resetVariables();
        $this->resetElements();
        $this->IsCachingAllowed = true;

        $this->resetErrorLog();

        $this->TemplatesUsageStatistics = array();
        $this->TemplateFetchList = array();
    }
584797
function delete() {
        $sizes   = array_keys($this->getSizes());
        $sizes[] = null;
        $sizes[] = '_';
        foreach($sizes as $size) {
            $f = $this->makePath($size);
            if($f) {
                \File::delete($f);
            }
        }
    }
56833
def delete_template(self, temp_id=None, params={}, callback=None, **kwargs):
        

        url = self.mk_url(*['_search', 'template', temp_id])

        self.client.fetch(
            self.mk_req(url, method='DELETE', **kwargs),
            callback = callback
        )