public function delete($condition)
 {
     parent::delete($condition);
     // delete blocks associated with this route and style
     if ($condition instanceof $this->_entity_class) {
         $block_mapper = $this->mapper_factory->create('blocks', 'blocks');
         $block_mapper->delete(array('style' => $condition->get_style(), 'route_id' => $condition->get_route_id()));
     }
 }
 public function delete($condition)
 {
     parent::delete($condition);
     // delete menu items associated with this menu
     if ($condition instanceof $this->_entity_class) {
         $items_mapper = $this->mapper_factory->create('menus', 'items');
         $items_mapper->delete(array('menu_id' => $condition->get_menu_id()));
     }
 }
    public function delete($condition)
    {
        parent::delete($condition);
        // move blocks up for position
        if ($condition instanceof $this->_entity_class) {
            $this->db->sql_query('UPDATE ' . $this->_entity_table . '
				SET weight = weight - 1
				WHERE weight > ' . $condition->get_weight() . '
					AND style = ' . $condition->get_style() . '
					AND route_id = ' . $condition->get_route_id() . "\n\t\t\t\t\tAND position = '" . $condition->get_position() . "'");
        }
    }