本文整理汇总了PHP中Base::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Base::delete方法的具体用法?PHP Base::delete怎么用?PHP Base::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Base
的用法示例。
在下文中一共展示了Base::delete方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete()
{
// Get all related nodes through the general id
$client = $this->getClient();
$label = $client->makeLabel($this->getGeneralId());
$related_nodes = $label->getNodes();
foreach ($related_nodes as $related_node) {
// Get and delete all of the relationships
$relationships = $related_node->getRelationships();
foreach ($relationships as $relationship) {
$relationship->delete();
}
$related_node->delete();
}
// Delete the main node
parent::delete();
}
示例2: delete
/**
* Create DELETE request to a specified endpoint.
*
* @param (string) $path API endpoint path.
* @param (string) $path_args Endpoint path arguments to replace tokens in the path.
* @param (string) $data Raw content of the request or associative array to pass to endpoints.
*
* @return object Preprocessed structured object and returns 204 No Content on success, with no response body.
*/
public function delete($path, array $path_args = [], array $data = [])
{
parent::delete($path, $path_args, $data);
$this->setHeaders(['Authorization' => $this->auth()]);
$this->unsetHeaders(['Content-Type']);
return $this->request($data);
}
示例3: delete
/**
* @override \Podlove\Model\Base::delete();
*/
public function delete()
{
foreach ($this->media_files() as $media_file) {
$media_file->delete();
}
parent::delete();
}
示例4: delete
/**
* Deletes self and passes the call to parent class
* @see solidbase/lib/Base#delete()
*/
function delete()
{
global $USER;
if ($this->may($USER, DELETE)) {
self::deleteFromMenu();
return parent::delete();
}
return false;
}
示例5: delete
function delete()
{
global $DB;
if ($this->mayI(DELETE)) {
$DB->pagelayout->delete($this->ID);
$DB->query("UPDATE `pagelayout` SET (`pagelayout`.`place`=`pagelayout`.`place`-1) WHERE `pagelayout`.`place`>'" . $this->place . "' AND `pid`='" . $this->page . "' `row`='" . $this->row . "'");
return parent::delete();
} else {
return false;
}
}