paragraphs.inc in Reference Table Formatter 7
File
plugins/reference_types/paragraphs.inc
View source
<?php
$plugin = array(
'handler' => array(
'class' => 'reference_table_formatter_paragraphs',
),
);
class reference_table_formatter_paragraphs extends reference_table_formatter_base_type {
public function get_bundles() {
return count($this->instance['settings']['allowed_bundles']) > 0 ? array_keys($this->instance['settings']['allowed_bundles']) : array_keys(paragraphs_bundle_load());
}
public function entity_name() {
return 'paragraphs_item';
}
function renderable_properties() {
return array();
}
function load_entity_from_item($item) {
return paragraphs_item_load($item['value']);
}
}