You are here

function hosting_nodeapi in Hosting 5

Same name and namespace in other branches
  1. 6.2 hosting.module \hosting_nodeapi()
  2. 7.4 hosting.module \hosting_nodeapi()
  3. 7.3 hosting.module \hosting_nodeapi()

Implementation of hook_nodeapi

This function redirects to hosting_nodeapi_$nodetype_$op calls, to save ourselves from an incessant amount of intricately nested code, and allow easier extension / maintenance.

File

./hosting.module, line 137
Hosting module

Code

function hosting_nodeapi(&$node, $op, $teaser) {
  $func = "hosting_nodeapi_" . $node->type . "_" . str_replace(" ", "_", $op);
  if (function_exists($func)) {
    $func($node, $op, $teaser);
  }
}