Remove contents

@param \Coral\ContentBundle\Entity\Content $contents
517258
public function removeContent(\Coral\ContentBundle\Entity\Content $contents)
    {
        $this->contents->removeElement($contents);
    }
954953
public function setContent( $content )
	{
		if( $this->content === (string) $content )
			return FALSE;
		$this->content = (string) $content;
		return TRUE;
	}
139492
function deleteStoredClassAttribute( $contentClassAttribute, $version = null )
    {
        $contentClassAttributeID = $contentClassAttribute->attribute( 'id' );
        eZEnumValue::removeAllElements( $contentClassAttributeID, $version );

    }
162963
public function actionRemoveContentElements($contentId = null)
    {
        $query = CmsContentElement::find();
        if ($contentId) {
            $query->andWhere(['content_id' => $contentId]);
        }

        if (!$count = $query->count()) {
            $this->stdout("Content elements not found!\n", Console::BOLD);
            return;
        }

        $this->stdout("1. Found elements: {$count}!\n", Console::BOLD);

        foreach ($query->orderBy([
            'content_id' => SORT_ASC,
            'id' => SORT_ASC
        ])->each(10) as $cmsContentElement) {
            $this->stdout("\t{$cmsContentElement->id}: {$cmsContentElement->name}");

            if ($cmsContentElement->delete()) {
                $this->stdout(" - deleted\n", Console::FG_GREEN);
            } else {
                $this->stdout(" - NOT deleted\n", Console::FG_RED);
            }
        }
    }
356338
protected function saveContents($contents)
    {
        $this->contents = $contents;

        try {
            $this->getFilesystem()->put($this->getFilepath(), json_encode($contents));
        } catch (Exception $e) {
            // ...
        }
    }
1319376
public function replaceIdxContentContents(array $contents)
    {
        $parentUids = array();
        foreach ($contents as $content) {
            // avoid loop if content is already treated
            if (null === $content || true === $content->isElementContent()) {
                continue;
            } elseif (true === array_key_exists($content->getUid(), $parentUids)) {
                break;
            } elseif (false === array_key_exists($content->getUid(), $parentUids)) {
                $parentUids[$content->getUid()] = array($content->getUid());
            }

            $parentUids[$content->getUid()] = array_merge($parentUids[$content->getUid()], $this->getAClassContentUids($content->getSubcontent()->toArray()));
        }

        return $this->replaceIdxContentContentsByUids($parentUids);
    }
45780
public function removeChildren(\Coral\ContentBundle\Entity\Node $children)
    {
        $this->children->removeElement($children);
    }
300547
function deleteStoredObjectAttribute( $contentObjectAttribute, $version = null )
    {
        $contentObjectAttributeID = $contentObjectAttribute->attribute( 'id' );
        eZEnumObjectValue::removeAllElements( $contentObjectAttributeID, $version );

    }
1220743
public function deleteContent(array $ids): void
	{
		if ($this->isAjax() && $this->editConst) {
			$pages = $this->orm->content->findById($ids);
			foreach ($pages as $page) {
				$this->orm->content->remove($page);
			}
			$this->orm->flush();
			$this['list']->reload();
		} else {
			$this->terminate();
		}
	}
1282553
public function forget($key)
    {
        $contents = $this->getContents();
        Arr::forget($contents, $key);

        $this->saveContents($contents);
    }
1233500
public function clear()
    {
        $this->assertOpened();
        foreach ($this->contents as $key => $value) {
            unset($this->contents[$key]);
        }
    }
224785
protected void deleteContentValue(CmsXmlContent content, Locale locale, String path) {

        boolean hasValue = content.hasValue(path, locale);
        if (hasValue) {
            int index = CmsXmlUtils.getXpathIndexInt(path) - 1;
            I_CmsXmlContentValue val = content.getValue(path, locale);
            if (index >= val.getMinOccurs()) {
                content.removeValue(path, locale, index);
            } else {
                val.setStringValue(m_cms, "");
            }
        }
    }
269184
static function removeURLlinkList( $contentObjectAttributeID, $contentObjectAttributeVersion )
    {
        $conditions = array( 'contentobject_attribute_id' => $contentObjectAttributeID );
        if ( $contentObjectAttributeVersion !== false )
            $conditions['contentobject_attribute_version'] = $contentObjectAttributeVersion;
        eZPersistentObject::removeObject( eZURLObjectLink::definition(),
                                          $conditions );
    }
455544
def clear_content(self):
        
        content_child_elms = self[1:] if self.rPr is not None else self[:]
        for child in content_child_elms:
            self.remove(child)
552466
public function purgeForContent($contentId, $locationIds = [])
    {
        if ($this->isSwitchedOff() || !method_exists($this->purgeClient, 'purgeForContent')) {
            return;
        }

        $this->purgeClient->purgeForContent($contentId, $locationIds);
    }
245907
public function removeSection(\Coral\ContentBundle\Entity\Section $sections)
    {
        $this->sections->removeElement($sections);
    }
806561
public function addContents($contents)
    {
        if (current($contents) instanceof Content) {
            foreach ($contents as $content) {
                $this->addContent($content);
            }
        } else {
            foreach ($contents as $key => $value) {
                $this->addContent($key, $value);
            }
        }
    }