HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.34
System: Linux atalantini.com 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64
User: root (0)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: /var/www/html/coreplad/sites/all/modules/paragraphs/ParagraphsItemMetadataController.inc
<?php
/**
 * @file
 * Entity metadata implementation for the paragraphs entity.
 */

/**
 * Class ParagraphsItemMetadataController
 */
class ParagraphsItemMetadataController extends EntityDefaultMetadataController {

  public function entityPropertyInfo() {
    $info = parent::entityPropertyInfo();
    $properties = &$info['paragraphs']['properties'];


    $properties['field_name']['label'] = t('Field name');
    $properties['field_name']['description'] = t('The machine-readable name of the paragraphs field containing this item.');
    $properties['field_name']['required'] = TRUE;

    $properties['host_entity'] = array(
      'label' => t('Host entity'),
      'type' => 'entity',
      'description' => t('The entity containing the paragraphs field.'),
      'getter callback' => 'paragraphs_item_get_host_entity',
      'setter callback' => 'paragraphs_item_set_host_entity',
      'required' => TRUE,
    );

    return $info;
  }

}