(self)
return view_block
Returns a dict with the block data.

        Raises:
            ValueError: if the block has not been fed with data.
            TypeError: if the data that was fed is of the wrong type.

        Returns:
            A dict with the block data.
Returns a dict with the block data.
Returns a dict with the block data .
def to_dict(self):
        """Returns a dict with the block data.

        Raises:
            ValueError: if the block has not been fed with data.
            TypeError: if the data that was fed is of the wrong type.

        Returns:
            A dict with the block data.
        """
        if not self._data:
            raise ValueError('No data has been fed to the block.')

        view_obj = self._data
        if not hasattr(view_obj, 'id'):
            raise TypeError('View object is not correctly formed.')

        if not hasattr(view_obj, 'name'):
            raise TypeError('View object is not correctly formed.')

        view_block = self._get_base()
        view_block['componentName'] = 'TsViewEventList'
        view_block['componentProps']['view'] = {
            'id': view_obj.id, 'name': view_obj.name}

        return view_block
def to_dict ( self ) : if not self . _data : raise ValueError ( 'No data has been fed to the block.' ) view_obj = self . _data if not hasattr ( view_obj , 'id' ) : raise TypeError ( 'View object is not correctly formed.' ) if not hasattr ( view_obj , 'name' ) : raise TypeError ( 'View object is not correctly formed.' ) view_block = self . _get_base ( ) view_block [ 'componentName' ] = 'TsViewEventList' view_block [ 'componentProps' ] [ 'view' ] = { 'id' : view_obj . id , 'name' : view_obj . name } return view_block