You are here

function _outline_designer_get_pstr in Outline Designer 5

2 calls to _outline_designer_get_pstr()
_outline_designer_ajax in ./outline_designer.module
Implementation of the ajax menu hook
_outline_designer_tree_recurse in ./outline_designer.module
This is a helper function for pulling all the data about a tree together to be rendered, recursively traversing the tree to get all the nodes, it is a helper function for the load_tree ajax function

File

./outline_designer.module, line 614

Code

function _outline_designer_get_pstr($op, $type) {
  $term = 'content';
  switch ($type) {

    // Panels are a totally special case
    case 'panel':
      if ($op == 'create') {
        return 'create panel-nodes';
      }
      elseif ($op == 'edit') {
        return 'administer panel-nodes';
      }
      elseif ($op == 'edit own') {
        return 'edit own panel-nodes';
      }
      break;
    case 'book':
      $term = 'pages';
      break;
    default:
      break;
  }
  return $op . ' ' . $type . ' ' . $term;
}