function deleteStoredObjectAttribute( $contentObjectAttribute, $version = null )
    {
        $version = $contentObjectAttribute->objectVersion();
        if ( !is_null( $version ) &&
             $version->attribute( 'status' ) == eZContentObjectVersion::STATUS_PUBLISHED )
        {
            $contentObjectID = $contentObjectAttribute->attribute( 'contentobject_id' );
            $languageID = $contentObjectAttribute->attribute( 'language_id' );
            eZPersistentObject::removeObject( ezcomComment::definition(), 
                                              array( 'contentobject_id' => $contentObjectID,
                                                     'language_id' => $languageID ) );
        }
    }
function deleteStoredObjectAttribute( $contentObjectAttribute, $version = null )
    {
        $version = $contentObjectAttribute->objectVersion();
        if ( !is_null( $version ) &&
             $version->attribute( 'status' ) == eZContentObjectVersion::STATUS_PUBLISHED )
        {
            $contentObjectID = $contentObjectAttribute->attribute( 'contentobject_id' );
            $languageID = $contentObjectAttribute->attribute( 'language_id' );
            eZPersistentObject::removeObject( ezcomComment::definition(), 
                                              array( 'contentobject_id' => $contentObjectID,
                                                     'language_id' => $languageID ) );
        }
    }
function deleteStoredObjectAttribute ( $ contentObjectAttribute , $ version = null ) { $ version = $ contentObjectAttribute -> objectVersion ( ) ; if ( ! is_null ( $ version ) && $ version -> attribute ( 'status' ) == eZContentObjectVersion :: STATUS_PUBLISHED ) { $ contentObjectID = $ contentObjectAttribute -> attribute ( 'contentobject_id' ) ; $ languageID = $ contentObjectAttribute -> attribute ( 'language_id' ) ; eZPersistentObject :: removeObject ( ezcomComment :: definition ( ) , array ( 'contentobject_id' => $ contentObjectID , 'language_id' => $ languageID ) ) ; } }
When deleting the content object, deleting all the comments.
@see kernel/classes/eZDataType#deleteStoredObjectAttribute($objectAttribute, $version)
When deleting the content object deleting all the comments .