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


PHP ezpObject::remove方法代码示例

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


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

示例1: tearDown

 public function tearDown()
 {
     $this->fileAttribute = null;
     $this->imageObject->remove();
     $this->imageObject = null;
     eZContentClassOperations::remove($this->imageClass->id);
     $this->imageClass = null;
     parent::tearDown();
 }
开发者ID:nfrp,项目名称:ezpublish,代码行数:9,代码来源:ezimagetype_regression.php

示例2: tearDown

 public function tearDown()
 {
     $this->solrSearch->removeObject($this->object->object);
     $this->object->remove();
     $this->object = null;
     $this->solrSearch = null;
     ezpINIHelper::restoreINISettings();
     parent::tearDown();
 }
开发者ID:netbliss,项目名称:ezfind,代码行数:9,代码来源:ezsolr_regression.php

示例3: tearDown

 public function tearDown()
 {
     if (self::ldapIsEnabled()) {
         $this->mainGroup->remove();
     }
     parent::tearDown();
 }
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:7,代码来源:ezldapuser_test.php

示例4: testIssue19174

 /**
  * Regression test for issue {@see #19174 http://issues.ez.no/19174}
  */
 public function testIssue19174()
 {
     $bkpLanguages = eZContentLanguage::prioritizedLanguageCodes();
     // add a secondary language
     $locale = eZLocale::instance('fre-FR');
     $translation = eZContentLanguage::addLanguage($locale->localeCode(), $locale->internationalLanguageName());
     // create related objects
     $relatedObjectsIds = array($this->createObjectForRelation(), $this->createObjectForRelation(), $this->createObjectForRelation(), $this->createObjectForRelation());
     $xmlTextEn = "<embed href=\"ezobject://{$relatedObjectsIds[0]}\" /><link href=\"ezobject://{$relatedObjectsIds[1]}\">link</link>";
     $xmlTextFr = "<embed href=\"ezobject://{$relatedObjectsIds[2]}\" /><link href=\"ezobject://{$relatedObjectsIds[3]}\">link</link>";
     // Create an article in eng-GB, and embed related object one in the intro
     $article = new ezpObject('article', 2, 14, 1, 'eng-GB');
     $article->title = __METHOD__ . ' eng-GB';
     $article->intro = $xmlTextEn;
     $articleId = $article->publish();
     // Workaround as setting folder->name directly doesn't produce the expected result
     $article->addTranslation('fre-FR', array('title' => __METHOD__ . ' fre-FR', 'intro' => $xmlTextFr));
     $relatedObjects = eZContentObject::fetch($articleId)->relatedObjects(false, false, 0, false, array('AllRelations' => eZContentObject::RELATION_LINK | eZContentObject::RELATION_EMBED));
     self::assertEquals(4, count($relatedObjects));
     $expectedRelations = array_flip($relatedObjectsIds);
     foreach ($relatedObjects as $relatedObject) {
         if (isset($expectedRelations[$relatedObject->ID])) {
             unset($expectedRelations[$relatedObject->ID]);
         }
     }
     self::assertEquals(0, count($expectedRelations));
     $article->remove();
     $translation->removeThis();
     eZContentLanguage::setPrioritizedLanguages($bkpLanguages);
 }
开发者ID:CG77,项目名称:ezpublish-legacy,代码行数:33,代码来源:ezxmltexttype_regression.php

示例5: testIssue18249

 /**
  * @group issue18249
  */
 public function testIssue18249()
 {
     // setup a class C1 with objectrelationlist and pattern name
     $classIdentifier = strtolower(__FUNCTION__);
     $class1 = new ezpClass(__FUNCTION__, $classIdentifier, '<test_name><test_relation>');
     $class1->add('Test name', 'test_name', 'ezstring');
     $class1->add('Test Relation', 'test_relation', 'ezobjectrelationlist');
     $class1->store();
     $o1 = new ezpObject('article', 2, 14, 1, 'eng-GB');
     $o1->title = 'Test_ENG';
     $o1->publish();
     $o1->addTranslation('xxx-XX', array('title' => 'Test_XXX'));
     $o2 = new ezpObject($classIdentifier, 2, 14, 1, 'xxx-XX');
     $o2->test_name = 'name_';
     $o2->test_relation = array($o1->attribute('id'));
     $o2->publish();
     // test O2's name
     $this->assertEquals('name_Test_XXX', $o2->name);
     $o1->remove();
     $o2->remove();
 }
开发者ID:nfrp,项目名称:ezpublish,代码行数:24,代码来源:ezobjectrelationlist_regression.php

示例6: testTranslateWildcardNopUri

 /**
  * @see http://issues.ez.no/19062
  * @group issue19062
  * @covers eZURLAliasML::translate
  */
 public function testTranslateWildcardNopUri()
 {
     $folder = new ezpObject('folder', 2);
     $folder->name = 'foo';
     $folder->publish();
     // By creating following URL alias, "test/single-page" will be registered as a NOP URI segment
     $uriFirstSegment = 'test19062';
     $uriWildcard = "{$uriFirstSegment}/single-page";
     $res = eZURLAliasML::storePath("{$uriWildcard}/article.html", "eznode:{$folder->mainNode->node_id}", $this->englishLanguage, 0, true);
     $wildcard = eZURLWildcardTest::createWildcard($uriWildcard, 'foo', eZURLWildcard::TYPE_FORWARD);
     // Translating the wildcard URL should return false in order to be then translated by eZURLWildcard in index.php
     self::assertFalse(eZURLAliasML::translate($uriWildcard));
     // Here no wildcard and test19062 should be a nop segment (points to nothing.
     // Default behaviour is to return true and redirect to root ("/")
     self::assertTrue(eZURLAliasML::translate($uriFirstSegment));
     $folder->remove();
     $wildcard->remove();
 }
开发者ID:,项目名称:,代码行数:23,代码来源:

示例7: testNonBreakSpace

 /**
  * Test for issue #14370: Inserting non break space doesn't work
  *
  * @note Test depends on template output!!
  * @link http://issues.ez.no/14370
  */
 public function testNonBreakSpace()
 {
     $xmlData = '<paragraph>esp&nbsp;ace</paragraph>';
     // Step 1: Create folder
     $folder = new ezpObject("folder", 2);
     $folder->name = "Non breaking space Test";
     $folder->short_description = $xmlData;
     $folder->publish();
     $xhtml = $folder->short_description->attribute('output')->attribute('output_text');
     $folder->remove();
     self::assertEquals('<p>esp&nbsp;ace</p>', $xhtml);
 }
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:18,代码来源:ezxmltext_regression.php

示例8: testIssue17632

    /**
     * Regression test for issue {@see #17632 http://issues.ez.no/17632}
     *
     * In a multi language environment, a node fetched with a language other than the prioritized one(s) will return the
     * URL alias in the prioritized language
     */
    public function testIssue17632()
    {
        $bkpLanguages = eZContentLanguage::prioritizedLanguageCodes();

        $strNameEngGB = __FUNCTION__ . " eng-GB";
        $strNameFreFR = __FUNCTION__ . " fre-FR";

        // add a secondary language
        $locale = eZLocale::instance( 'fre-FR' );
        $translation = eZContentLanguage::addLanguage( $locale->localeCode(), $locale->internationalLanguageName() );

        // set the prioritize language list to contain english
        // ezpINIHelper::setINISetting( 'site.ini', 'RegionalSettings', 'SiteLanguageList', array( 'fre-FR' ) );
        eZContentLanguage::setPrioritizedLanguages( array( 'fre-FR' ) );

        // Create an object with data in fre-FR and eng-GB
        $folder = new ezpObject( 'folder', 2, 14, 1, 'eng-GB' );
        $folder->publish();

        // Workaround as setting folder->name directly doesn't produce the expected result
        $folder->addTranslation( 'eng-GB', array( 'name' => $strNameEngGB ) );
        $folder->addTranslation( 'fre-FR', array( 'name' => $strNameFreFR ) );

        $nodeId = $folder->main_node_id;

        // fetch the node with no default parameters. Should return the french URL Alias
        $node = eZContentObjectTreeNode::fetch( $nodeId );
        self::assertEquals( 'testIssue17632-fre-FR' , $node->attribute( 'url_alias' ) );

        // fetch the node in english. Should return the english URL Alias
        $node = eZContentObjectTreeNode::fetch( $nodeId, 'eng-GB' );
        self::assertEquals( 'testIssue17632-eng-GB' , $node->attribute( 'url_alias' ) );

        $folder->remove();
        $translation->removeThis();
        ezpINIHelper::restoreINISettings();
        eZContentLanguage::setPrioritizedLanguages( $bkpLanguages );
    }
开发者ID:ataxel,项目名称:tp,代码行数:44,代码来源:ezcontentobjecttreenode_regression.php


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