Fluid Fieldtype Development - `dislpay_settings()` v.s. `grid_display_settings()` return data format

Aperta
#713 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
38/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
php
Ambito
documentation

Direzione di ricerca

The issue points to the Fluid Fieldtype Development documentation and includes an example of the return formats for standard and grid content types. Start by locating that section in the user guide and compare its guidance with the example. Done means the documentation explains the expected display_settings() and grid_display_settings() return formats for grid fields.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Suggested Change

To display settings for field types that support grid content types, the array returned from display_settings() method is a bit different.

Example: The relationship field makes this distinction by checking for the parent content type within the display_settings() method routine. See here: https://github.com/ExpressionEngine/ExpressionEngine/blob/61e559413f40324d888ff9ebf4f43dc5f74e8ea1/system/ee/ExpressionEngine/Addons/relationship/ft.relationship.php#L789-L797

Standard Channel Field display_settings()


$settings = array(
    // some SharedForm field settings
);

// return settings for standard channel field
return array('field_options_custom_field' => array(
      'label' => 'field_options',
      'group' => 'custom_field',
      'settings' => $settings
  ));

Fluid Field display_settings()


$settings = array(
    // some SharedForm field settings
);

// return settings for standard channel field
if ($this->content_type() == 'grid') {
    return array('field_options' => $settings);
}

NOTE: this should also be the format for data returned from grid_display_settings()

Reasoning

The documentation for Fluid Fieldtype Development does not explain this.

Additional context

@intoeetive I tried to look and see if this documentation already existed, but I do not believe that it does. If I missed it, please let me know!

Lingua principale
CSS
Stelle
22
Fork
79
Merge medio
2g 1h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ExpressionEngine/ExpressionEngine-User-Guide

Tutte le issue di ExpressionEngine/ExpressionEngine-User-Guide

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.