sandbox/rudiedirkx/2146351.git/blob

2014 年 1 月 18 日5810

<?php

/**

* Implements hook_field_read_fields_alter().

*

* You've added this alter to field_read_fields(), to make this module work.

*

* All field info will go through this hook and be cached, so you can do some

* magic in here, but don't push it. There's also hook_field_read_field(), but

* that's not an alter and it runs too early.

*/

// Change the field settings/config to all modules using field_info_field()

// see those changes.

as

}

// Give every field another column. This only makes Field think the column

// exists! It doesn't actually create it in the db!

as

// If the column is called 'secondary_language' here, it should be

// called 'FIELD_NAME_secondary_language' in the db.

);

}

// This is apparently important to Views...

}

/**

* Implements hook_field_widget_form_alter().

*

* This is an example of how easy it is to make that new column work for

* you. In this case we're exposing custom column 'secondary_language' in

* field 'field_images'. This is all you need. Storage and loading will

* be handled by Field.

*/

as $delta) {

?

);

}

}

}

}

}

0 0