This project is not covered by Drupal’s security advisory policy.
The DrupalOop module is a simple backend OOP structure for building modules in Drupal 7. The idea is to write modules and other custom Drupal components as PHP Objects as simply as possible. This allows for PHPUnit testing to be more easily applied to Drupal 7 code and provides helper methods for actions that are module specific.
To keep things simple, there is no dependecy on anything Drupal 8. You don't need composer or to know what PSR-4 is. Everything is done using Drupal 7 standards.
This module is still in a development phase, so large changes to the structure are still possible, but the base has mostly settled.
Current Supported Components
- Modules
- Blocks
- Text Filters
Creating a Module
Creating a module works the same with DrupalOop as any normal module. You need a .info and a .module file. With DrupalOop, you can create an object to contain your module-specific functionality and register it to Drupal like any other file.
awesome_sauce.info
name = Awesome Sauce
...
dependencies[] = drupaloop
files[] = src/AwesomeSauceModule.php
awesome_sauce.module
/**
* @file
* This module is awesome. And saucy.
*/
// Implement regular Drupal hooks here, but offload custom logic to the module class.
src/AwesomeSauceModule.php
class AwesomeSauceModule extends DrupalModule {
// Do your stuff here
}
Project information
- Unsupported
Not supported (i.e. abandoned), and no longer being developed. Learn more about dealing with unsupported (abandoned) projects - No further development
No longer developed by its maintainers. - Module categories: Developer Tools
- 6 sites report using this module
- Created by KeyboardCowboy on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.