本文整理汇总了PHP中DataObject::onAfterDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP DataObject::onAfterDelete方法的具体用法?PHP DataObject::onAfterDelete怎么用?PHP DataObject::onAfterDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataObject
的用法示例。
在下文中一共展示了DataObject::onAfterDelete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onAfterDelete
public function onAfterDelete()
{
parent::onAfterDelete();
foreach ($this->Answers() as $answer) {
$answer->delete();
}
}
示例2: onAfterDelete
function onAfterDelete()
{
parent::onAfterDelete();
// Force thread to recalculate it's most recent.
if ($this->ThreadID) {
$this->Thread()->updateLastPost();
}
}
示例3: onAfterDelete
public function onAfterDelete()
{
parent::onAfterDelete();
// Trigger Deletion Of All Related MCListSegments On Event Deletion
$segments = $this->owner->getComponents("MCListSegments");
foreach ($segments as $segment) {
$segment->delete();
}
}
示例4: onAfterDelete
public function onAfterDelete()
{
parent::onAfterDelete();
// Delete associated permission codes
$codes = $this->Codes();
foreach ($codes as $code) {
$code->delete();
}
}
示例5: onAfterDelete
public function onAfterDelete()
{
parent::onAfterDelete();
if ($values = $this->Perms->getValues()) {
foreach ($values as $perm) {
singleton('PermissionService')->clearPermCacheFor($this->getItem(), $perm);
}
}
}
示例6: onAfterDelete
function onAfterDelete()
{
// Need to flush cache to avoid outdated versionnumber references
$this->flushCache();
// Need to mark pages depending to this one as broken
$dependentPages = $this->DependentPages();
if ($dependentPages) {
foreach ($dependentPages as $page) {
// $page->write() calls syncLinkTracking, which does all the hard work for us.
$page->write();
}
}
parent::onAfterDelete();
}
示例7: onAfterDelete
/**
*
*/
protected function onAfterDelete()
{
parent::onAfterDelete();
if (isset($this->dataSource)) {
$this->dataSource->delete();
}
}
示例8: onAfterDelete
/**
* Delete any related config files
*/
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());
}
$deployments = $this->Deployments();
if ($deployments && $deployments->exists()) {
foreach ($deployments as $deployment) {
$deployment->delete();
}
}
$archives = $this->DataArchives();
if ($archives && $archives->exists()) {
foreach ($archives as $archive) {
$archive->delete();
}
}
$transfers = $this->DataTransfers();
if ($transfers && $transfers->exists()) {
foreach ($transfers as $transfer) {
$transfer->delete();
}
}
$pings = $this->Pings();
if ($pings && $pings->exists()) {
foreach ($pings as $ping) {
$ping->delete();
}
}
$create = $this->CreateEnvironment();
if ($create && $create->exists()) {
$create->delete();
}
}
示例9: onAfterDelete
/**
* Delete any related config files
*/
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());
}
$create = $this->CreateEnvironment();
if ($create && $create->exists()) {
$create->delete();
}
}
示例10: onAfterDelete
public function onAfterDelete()
{
parent::onAfterDelete();
if (Versioned::current_stage() == 'Stage') {
$this->Pages()->removeAll();
$this->BlockSets()->removeAll();
}
}
示例11: onAfterDelete
/**
* Updates link tracking.
*/
protected function onAfterDelete()
{
parent::onAfterDelete();
$brokenPages = $this->BackLinkTracking();
if ($brokenPages) {
$origStage = Versioned::current_stage();
// This will syncLinkTracking on draft
Versioned::reading_stage('Stage');
foreach ($brokenPages as $brokenPage) {
$brokenPage->write();
}
// This will syncLinkTracking on published
Versioned::reading_stage('Live');
foreach ($brokenPages as $brokenPage) {
$brokenPage->write();
}
Versioned::reading_stage($origStage);
}
}
示例12: onAfterDelete
/**
* API Callback after this object is removed from to the DB
*
*/
public function onAfterDelete()
{
parent::onAfterDelete();
foreach ($this->Items() as $item) {
$item->delete();
}
}
示例13: onAfterDelete
/**
* When deleting an action from a workflow definition, make sure that workflows currently paused on that action
* are deleted
* Also removes all outbound transitions
*/
public function onAfterDelete()
{
parent::onAfterDelete();
$wfActionInstances = WorkflowActionInstance::get()->leftJoin("WorkflowInstance", '"WorkflowInstance"."ID" = "WorkflowActionInstance"."WorkflowID"')->where(sprintf('"BaseActionID" = %d AND ("WorkflowStatus" IN (\'Active\',\'Paused\'))', $this->ID));
foreach ($wfActionInstances as $wfActionInstance) {
$wfInstances = WorkflowInstance::get()->filter('CurrentActionID', $wfActionInstance->ID);
foreach ($wfInstances as $wfInstance) {
$wfInstance->Groups()->removeAll();
$wfInstance->Users()->removeAll();
$wfInstance->delete();
}
$wfActionInstance->delete();
}
// Delete outbound transitions
$transitions = WorkflowTransition::get()->filter('ActionID', $this->ID);
foreach ($transitions as $transition) {
$transition->Groups()->removeAll();
$transition->Users()->removeAll();
$transition->delete();
}
}
示例14: onAfterDelete
function onAfterDelete() {
// Need to flush cache to avoid outdated versionnumber references
$this->flushCache();
parent::onAfterDelete();
}
示例15: onAfterDelete
public function onAfterDelete()
{
parent::onAfterDelete();
$this->ScheduledJob()->delete();
}