$types['styles'] = array( '#items' => array(), '#pre_render' => array('drupal_pre_render_styles'), '#group_callback' => 'drupal_group_css', '#aggregate_callback' => 'drupal_aggregate_css', );
→ #group_callback, #aggregate_callback
/** | |
* Parse the user ID from the Drupal.visitor.user.uid cookie. | |
* | |
* @return Number | |
* The user id: nonzero if it is an authenticated user, zero if it is the | |
* anonymous user, in which case the Drupal.visitor.user.uid cookie value will | |
* not exist either. | |
* | |
* @see user_user_login() | |
* @see user_user_logout() |
$types['styles'] = array( '#items' => array(), '#pre_render' => array('drupal_pre_render_styles'), '#group_callback' => 'drupal_group_css', '#aggregate_callback' => 'drupal_aggregate_css', );
→ #group_callback, #aggregate_callback
public function fieldForm(EntityInterface $entity, $field_name, $langcode, $view_mode) { | |
print 'called, yay!';exit; |
$ grunt | |
Running "concat:edit" (concat) task | |
File "build/edit.js" created. | |
Running "min:edit" (min) task | |
File "build/edit.min.js" created. | |
Uncompressed size: 83949 bytes. | |
Compressed size: 7684 bytes gzipped (29545 bytes minified). | |
Running "min:backbone" (min) task |
$view = views_get_view($view_name); | |
$view->set_display($view_display); | |
$view->init_handlers(); | |
$view->preview($view_display); | |
$rerendered_field = $view->render_field($field_name, $view_row); |
print '<hr>'; | |
// Node -> EntityFormController | |
$entity = entity_load('node', 1); | |
$entity = $entity->getBCEntity(); | |
var_dump($entity->getTranslation('und', FALSE)->get('field_tags')->getValue()); | |
$form = array(); | |
$form_state = array(); | |
$options = array( | |
'field_name' => 'field_tags' |
/** | |
* Implements hook_library(). | |
*/ | |
function edit_library_info() { | |
print '<hr>'; | |
// Node -> EntityFormController | |
$entity = entity_load('node', 1); | |
var_dump($entity->getTranslation('und', FALSE)->get('field_tags')->getValue()); |
$comment = comment_load(1); | |
var_dump($comment->access('view')); | |
var_dump($comment->access('update')); | |
exit; |
/** | |
* Implements hook_entity_view_alter(). | |
*/ | |
function edit_entity_view_alter(&$build, EntityInterface $entity, EntityDisplay $display) { | |
$build['#attributes']['data-edit-entity'] = $entity->entityType() . '/' . $entity->id(); | |
} | |
// /** | |
// * Implements hook_preprocess_HOOK() for node.tpl.php. | |
// * |
function edit_entity_view_alter(&$build, EntityInterface $entity, EntityDisplay $display) { | |
$build['#attributes']['data-edit-entity'] = $entity->entityType() . '/' . $entity->id(); | |
} |