X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fmodules%2Fcontrib%2Fsearch_api_synonym%2Fsrc%2FSynonymViewsData.php;fp=web%2Fmodules%2Fcontrib%2Fsearch_api_synonym%2Fsrc%2FSynonymViewsData.php;h=f33fc270532a42102ad0fe25fd8ac159868f79f5;hb=4e1bfbf98b844da83b18aca92ef00f11a4735806;hp=0000000000000000000000000000000000000000;hpb=f3baf763d342a5f82576890e2a8111a5aaf139dc;p=yaffs-website diff --git a/web/modules/contrib/search_api_synonym/src/SynonymViewsData.php b/web/modules/contrib/search_api_synonym/src/SynonymViewsData.php new file mode 100644 index 000000000..f33fc2705 --- /dev/null +++ b/web/modules/contrib/search_api_synonym/src/SynonymViewsData.php @@ -0,0 +1,162 @@ +t('Synonyms managed by Search API Synonyms module.'); + $data['search_api_synonym_field_data']['table']['base']['defaults']['field'] = 'word'; + $data['search_api_synonym_field_data']['table']['wizard_id'] = 'synonym'; + + $data['search_api_synonym_field_data']['sid']['title'] = $this->t('Synonym ID'); + $data['search_api_synonym_field_data']['sid']['help'] = $this->t('The unique id of the synonym entity.'); + + $data['search_api_synonym_field_data']['word']['title'] = $this->t('Word'); + $data['search_api_synonym_field_data']['word']['help'] = $this->t('The word we are defining synonyms for.'); + + $data['search_api_synonym_field_data']['synonyms']['title'] = $this->t('Synonyms'); + $data['search_api_synonym_field_data']['synonyms']['help'] = $this->t('The synonyms to the word.'); + + $data['search_api_synonym_field_data']['type']['title'] = $this->t('Type'); + $data['search_api_synonym_field_data']['type']['help'] = $this->t('The type of synonym. Either synonym or spelling error.'); + + $data['search_api_synonym_field_data']['created']['title'] = $this->t('Create date'); + $data['search_api_synonym_field_data']['created']['help'] = $this->t('Date and time of when the synonym was created.'); + + $data['search_api_synonym_field_data']['created_fulldata'] = [ + 'title' => $this->t('Created date'), + 'help' => $this->t('Date in the form of CCYYMMDD.'), + 'argument' => [ + 'field' => 'created', + 'id' => 'date_fulldate', + ], + ]; + + $data['search_api_synonym_field_data']['created_year_month'] = [ + 'title' => $this->t('Created year + month'), + 'help' => $this->t('Date in the form of YYYYMM.'), + 'argument' => [ + 'field' => 'created', + 'id' => 'date_year_month', + ], + ]; + + $data['search_api_synonym_field_data']['created_year'] = [ + 'title' => $this->t('Created year'), + 'help' => $this->t('Date in the form of YYYY.'), + 'argument' => [ + 'field' => 'created', + 'id' => 'date_year', + ], + ]; + + $data['search_api_synonym_field_data']['created_month'] = [ + 'title' => $this->t('Created month'), + 'help' => $this->t('Date in the form of MM (01 - 12).'), + 'argument' => [ + 'field' => 'created', + 'id' => 'date_month', + ], + ]; + + $data['search_api_synonym_field_data']['created_day'] = [ + 'title' => $this->t('Created day'), + 'help' => $this->t('Date in the form of DD (01 - 31).'), + 'argument' => [ + 'field' => 'created', + 'id' => 'date_day', + ], + ]; + + $data['search_api_synonym_field_data']['created_week'] = [ + 'title' => $this->t('Created week'), + 'help' => $this->t('Date in the form of WW (01 - 53).'), + 'argument' => [ + 'field' => 'created', + 'id' => 'date_week', + ], + ]; + + $data['search_api_synonym_field_data']['changed']['title'] = $this->t('Updated date'); + $data['search_api_synonym_field_data']['changed']['help'] = $this->t('Date and time of when the synonym was last updated.'); + + $data['search_api_synonym_field_data']['changed_fulldata'] = [ + 'title' => $this->t('Changed date'), + 'help' => $this->t('Date in the form of CCYYMMDD.'), + 'argument' => [ + 'field' => 'changed', + 'id' => 'date_fulldate', + ], + ]; + + $data['search_api_synonym_field_data']['changed_year_month'] = [ + 'title' => $this->t('Changed year + month'), + 'help' => $this->t('Date in the form of YYYYMM.'), + 'argument' => [ + 'field' => 'changed', + 'id' => 'date_year_month', + ], + ]; + + $data['search_api_synonym_field_data']['changed_year'] = [ + 'title' => $this->t('Changed year'), + 'help' => $this->t('Date in the form of YYYY.'), + 'argument' => [ + 'field' => 'changed', + 'id' => 'date_year', + ], + ]; + + $data['search_api_synonym_field_data']['changed_month'] = [ + 'title' => $this->t('Changed month'), + 'help' => $this->t('Date in the form of MM (01 - 12).'), + 'argument' => [ + 'field' => 'changed', + 'id' => 'date_month', + ], + ]; + + $data['search_api_synonym_field_data']['changed_day'] = [ + 'title' => $this->t('Changed day'), + 'help' => $this->t('Date in the form of DD (01 - 31).'), + 'argument' => [ + 'field' => 'changed', + 'id' => 'date_day', + ], + ]; + + $data['search_api_synonym_field_data']['changed_week'] = [ + 'title' => $this->t('Changed week'), + 'help' => $this->t('Date in the form of WW (01 - 53).'), + 'argument' => [ + 'field' => 'changed', + 'id' => 'date_week', + ], + ]; + + $data['search_api_synonym_field_data']['status']['title'] = $this->t('Active status'); + $data['search_api_synonym_field_data']['status']['help'] = $this->t('Whether the synonym is active and used by search engines or is it no active.'); + $data['search_api_synonym_field_data']['status']['filter']['label'] = $this->t('Active synonym status'); + $data['search_api_synonym_field_data']['status']['filter']['type'] = 'yes-no'; + + $data['search_api_synonym_field_data']['uid']['title'] = $this->t('Author uid'); + $data['search_api_synonym_field_data']['uid']['help'] = $this->t('If you need more fields than the uid add the synonym: author relationship'); + $data['search_api_synonym_field_data']['uid']['relationship']['title'] = $this->t('Author'); + $data['search_api_synonym_field_data']['uid']['relationship']['help'] = $this->t('The User ID of the synonym\'s author.'); + $data['search_api_synonym_field_data']['uid']['relationship']['label'] = $this->t('author'); + + return $data; + } + +}