PHP block and widget base framework