开发者

Creating custom CCK Field Types in Drupal

开发者 https://www.devze.com 2022-12-08 20:50 出处:网络
I\'ve been trying to get this module to work and no matter what I\'ve tried I can\'t seem to get this to show up in the \"Add Field\" selection box, full code is over here:

I've been trying to get this module to work and no matter what I've tried I can't seem to get this to show up in the "Add Field" selection box, full code is over here:

http://drupalbin.com/11854

The gist follows, I have the following hooks implemented:

function uc_product_content_install() {

}

function uc_product_content_uninstall() {

}

function uc_product_content_enable() {

}

function uc_product_content_disable() {

}

function uc_product_content_field_info() {

}

function uc_product_content_field_settings($op, $field) {

}

function uc_product_content_field($op, &$node, $field, &$items, $teaser, $page) {

}

function uc_product_co开发者_如何学Pythonntent_is_empty($item, $field) {

}

function uc_product_content_field_formatter_info() {

}

function uc_product_content_default_value(&$form, &$form_state, $field, $delta) {
}

function uc_product_content_widget(&$form, &$form_state, $field, $items, $delta = 0) {

}


In addition to the above hooks, I defined the following:

function uc_product_content_widget_info() {

}

function uc_product_content_widget_settings($op, $widget) {

}

And now it's showing up as a field, so I can continue working on it.

0

精彩评论

暂无评论...
验证码 换一张
取 消