62 lines
1.4 KiB
Plaintext
62 lines
1.4 KiB
Plaintext
<?php
|
|
|
|
|
|
/**
|
|
* Implements hook_init().
|
|
*/
|
|
// function materio_translator_init() {
|
|
// drupal_add_js(drupal_get_path('module', 'materio_translator').'/js/materio_translator.js');
|
|
// }
|
|
|
|
|
|
/**
|
|
* Implements hook_permission().
|
|
*/
|
|
// function materio_translator_permission() {
|
|
// $perms = array(
|
|
// 'add showroom localisation' => array(
|
|
// 'title' => t('add showroom localisation'),
|
|
// 'description' => t('add showroom localisation'),
|
|
// ),
|
|
// );
|
|
//
|
|
// return $perms;
|
|
// }
|
|
|
|
/**
|
|
* Implements hook_form_alter().
|
|
*/
|
|
function DISABLED_materio_translator_form_alter(&$form, &$form_state, $form_id) {
|
|
// act only on node edit form
|
|
if(isset($form['#node_edit_form'])){
|
|
// dsm($form_id, 'form_id');
|
|
// dsm($form, 'form');
|
|
// dsm($form_state, 'form_state');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
* Implements hook_field_access().
|
|
*/
|
|
function DISABLED_materio_translator_field_access($op, $field, $entity_type, $entity, $account) {
|
|
// dsm($op,'op');
|
|
// dsm($entity_type,'entity_type');
|
|
// if($op == "edit" && $entity_type == 'node'){
|
|
// if($field['translatable'] == 0){
|
|
// if($field['field_permissions']['type'] == FIELD_PERMISSIONS_CUSTOM){
|
|
// dsm($field,$field['field_name']);
|
|
// // dsm($entity,'entity');
|
|
// // dsm($account,'account');
|
|
//
|
|
// // check if field permissions are handled by field_permissions module
|
|
//
|
|
// // return FALSE;
|
|
// }
|
|
// }
|
|
// }
|
|
//
|
|
// return TRUE;
|
|
}
|