array( 'planting' => array( 'label' => t('Planting'), 'label_plural' => t('Plantings'), 'view' => 'farm_plantings', ), ), ); return $entities; } /** * Provide action links on specific paths, asset types, and views. * * @return array * Returns an array of actions and their meta information (see example below). */ function hook_farm_ui_actions() { // Define farm area actions. $actions = array( 'foo' => array( 'title' => t('Add a foo log'), 'href' => 'log/add/farm_foo', 'paths' => array( 'farm/asset/%/foo', ), 'assets' => array( 'bar', ), 'views' => array( 'foo_view', ), ), ); return $actions; } /** * Add breadcrumbs to the taxonomy view page. * * @param object $term * The taxonomy term entity. * * @return array * Returns an array of links to add to the term's breadcrumb. */ function hook_farm_ui_taxonomy_breadcrumb($term) { $breadcrumb = array(); // If the term is in farm_areas, add a link to /farm/areas. if ($term->vocabulary_machine_name == 'farm_areas') { $breadcrumb[] = l(t('Areas'), 'farm/areas'); } return $breadcrumb; } /** * @} */