当前位置: 首页>>代码示例>>PHP>>正文


PHP Alias::delete方法代码示例

本文整理汇总了PHP中Alias::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Alias::delete方法的具体用法?PHP Alias::delete怎么用?PHP Alias::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Alias的用法示例。


在下文中一共展示了Alias::delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: removeOrganization

 public function removeOrganization()
 {
     //delete organization roles
     $this->removeOrganizationRoles();
     $instance = new Alias();
     foreach ($this->getAliases() as $instance) {
         $instance->delete();
     }
     $instance = new Contact();
     foreach ($this->getContacts() as $instance) {
         $instance->removeContactRoles();
         $instance->delete();
     }
     $instance = new ExternalLogin();
     foreach ($this->getExternalLogins() as $instance) {
         $instance->delete();
     }
     $instance = new IssueLog();
     foreach ($this->getIssueLog() as $instance) {
         $instance->delete();
     }
     //delete parent and child relationships
     $this->removeOrganizationHierarchy();
     $this->delete();
 }
开发者ID:veggiematts,项目名称:coral-licensing,代码行数:25,代码来源:Organization.php

示例2: removeResource

 public function removeResource()
 {
     //delete data from child linked tables
     $this->removeResourceRelationships();
     $this->removePurchaseSites();
     $this->removeAuthorizedSites();
     $this->removeAdministeringSites();
     $this->removeResourceLicenses();
     $this->removeResourceLicenseStatuses();
     $this->removeResourceOrganizations();
     $this->removeResourcePayments();
     $this->removeAllSubjects();
     $this->removeAllIsbnOrIssn();
     $instance = new Contact();
     foreach ($this->getContacts() as $instance) {
         $instance->removeContactRoles();
         $instance->delete();
     }
     $instance = new ExternalLogin();
     foreach ($this->getExternalLogins() as $instance) {
         $instance->delete();
     }
     $instance = new ResourceNote();
     foreach ($this->getNotes() as $instance) {
         $instance->delete();
     }
     $instance = new Attachment();
     foreach ($this->getAttachments() as $instance) {
         $instance->delete();
     }
     $instance = new Alias();
     foreach ($this->getAliases() as $instance) {
         $instance->delete();
     }
     $this->delete();
 }
开发者ID:brandon-garcia,项目名称:resources,代码行数:36,代码来源:Resource.php

示例3: ResourceRelationship

        $resourceRelationship = new ResourceRelationship();
        $resourceRelationship->resourceID = $resourceID;
        $resourceRelationship->relatedResourceID = $parentResource;
        $resourceRelationship->relationshipTypeID = '1';
        //hardcoded because we're only allowing parent relationships
        try {
            $resourceRelationship->save();
        } catch (Exception $e) {
            echo $e->getMessage();
        }
    }
}
//next, delete and then re-insert the aliases
$alias = new Alias();
foreach ($resource->getAliases() as $alias) {
    $alias->delete();
}
$aliasTypeArray = array();
$aliasTypeArray = explode(':::', $_POST['aliasTypes']);
$aliasNameArray = array();
$aliasNameArray = explode(':::', $_POST['aliasNames']);
foreach ($aliasTypeArray as $key => $value) {
    if ($value && $aliasNameArray[$key]) {
        $alias = new Alias();
        $alias->resourceID = $resourceID;
        $alias->aliasTypeID = $value;
        $alias->shortName = $aliasNameArray[$key];
        $alias->save();
    }
}
//now delete and then re-insert the organizations
开发者ID:billdueber,项目名称:resources,代码行数:31,代码来源:submitProductUpdate.php

示例4: array

if (!$g_user->hasPermission('ManagePub')) {
    camp_html_display_error($translator->trans("You do not have the right to manage publications.", array(), 'pub'));
    exit;
}
$Pub = Input::Get('Pub', 'int', 0);
$Alias = Input::Get('Alias', 'int', 0);
if (!Input::IsValid()) {
    camp_html_display_error($translator->trans('Invalid input: $1', array('$1' => Input::GetErrorString())), $_SERVER['REQUEST_URI']);
    exit;
}
$publicationObj = new Publication($Pub);
$aliasObj = new Alias($Alias);
$errorMsgs = array();
if ($publicationObj->getDefaultAliasId() != $Alias) {
    $aliasName = $aliasObj->getName();
    $deleted = $aliasObj->delete();
    $cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
    $cacheService->clearNamespace('publication');
    if ($deleted) {
        camp_html_goto_page("/{$ADMIN}/pub/aliases.php?Pub={$Pub}");
    } else {
        $errorMsgs[] = $translator->trans('The alias $1 could not be deleted.', array('$1' => '<B>' . $aliasObj->getName() . '</B>'), 'pub');
    }
} else {
    $errorMsgs[] = $translator->trans('$1 is the default publication alias, it can not be deleted.', array('$1' => '<B>' . $aliasObj->getName() . '</B>'), 'pub');
}
$crumbs = array($translator->trans("Publication Aliases", array(), 'pub') => "aliases.php?Pub={$Pub}");
camp_html_content_top($translator->trans("Deleting alias", array(), 'pub'), array("Pub" => $publicationObj), true, false, $crumbs);
?>
<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:do_del_alias.php


注:本文中的Alias::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。