kernel/classes/ezpolicy.php
public function createTemporaryCopy()
    {
        if ( $this->attribute( 'original_id' ) === 0 )
            throw new Exception( 'eZPolicy #' . $this->attribute( 'id' ) . ' is already a temporary item (original: #'. $this->attribute( 'original_id' ) . ')' );

        $policyCopy = self::copy( $this->attribute( 'role_id' ) );
        $policyCopy->setAttribute( 'original_id', $this->attribute( 'id' ) );
        $policyCopy->store();

        return $policyCopy;
    }
public function createTemporaryCopy()
    {
        if ( $this->attribute( 'original_id' ) === 0 )
            throw new Exception( 'eZPolicy #' . $this->attribute( 'id' ) . ' is already a temporary item (original: #'. $this->attribute( 'original_id' ) . ')' );

        $policyCopy = self::copy( $this->attribute( 'role_id' ) );
        $policyCopy->setAttribute( 'original_id', $this->attribute( 'id' ) );
        $policyCopy->store();

        return $policyCopy;
    }
public function createTemporaryCopy ( ) { if ( $ this -> attribute ( 'original_id' ) === 0 ) throw new Exception ( 'eZPolicy #' . $ this -> attribute ( 'id' ) . ' is already a temporary item (original: #' . $ this -> attribute ( 'original_id' ) . ')' ) ; $ policyCopy = self :: copy ( $ this -> attribute ( 'role_id' ) ) ; $ policyCopy -> setAttribute ( 'original_id' , $ this -> attribute ( 'id' ) ) ; $ policyCopy -> store ( ) ; return $ policyCopy ; }
Creates a temporary copy for this policy so that it can be edited. The policies will be linked to the copy
@return eZPolicy the temporary copy
@since 4.4
Creates a temporary copy for this policy so that it can be edited . The policies will be linked to the copy