drupal函数node_get_types用法详解

本文简述了drupal函数node_get_types用法。分享给大家供大家参考。具体分析如下:

node_get_types函数是一个非常重要的drupal函数。
这个函数的作用是:得到节点的类型和名字
 
下面把node_get_types函数具体说明如下

node_get_types('types', $node);

得到系统所有的节点的类型的对象
 

node_get_types('type', $node);

得到系统中正在用的节点的类型的对象
 

node_get_types('module', $node);

得到系统中正在用的节点的类型的对象的模块名字
 

node_get_types('names', $node);

得到系统所有的节点的类型的名字
 

node_get_types('name', $node);

得到系统中正在用的节点的类型的名字

希望本文所述对大家的drupal建站有所帮助。