Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
migrate_plus
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
migrate_plus
Commits
71661449
Commit
71661449
authored
3 years ago
by
igor mashevskyi
Committed by
Lucas Hedding
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3232211
: Add documentation for Table source plugin
parent
5b949d3c
No related branches found
No related tags found
1 merge request
!11
Issue #3232211: Add documentation for Table source plugin
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Plugin/migrate/source/Table.php
+65
-1
65 additions, 1 deletion
src/Plugin/migrate/source/Table.php
with
65 additions
and
1 deletion
src/Plugin/migrate/source/Table.php
+
65
−
1
View file @
71661449
...
@@ -8,7 +8,66 @@ use Drupal\migrate\Plugin\migrate\source\SqlBase;
...
@@ -8,7 +8,66 @@ use Drupal\migrate\Plugin\migrate\source\SqlBase;
use
Drupal\migrate\Plugin\MigrationInterface
;
use
Drupal\migrate\Plugin\MigrationInterface
;
/**
/**
* Source plugin for retrieving data via URLs.
* SQL table source plugin.
*
* Available configuration keys:
* - table_name: The base table name.
* - id_fields: Fields used by migrate to identify table rows uniquely.
* At least one field is required.
* - fields: (optional) An indexed array of columns present in the specified table.
* Documents the field names of data provided by the source table.
*
* Examples:
*
* @code
* source:
* plugin: table
* table_name: colors
* id_fields:
* color_name:
* type: string
* hex:
* type: string
* fields:
* color_name: color_name
* hex: hex
* @endcode
*
* In this example color data is retrieved from the source
* table.
*
* @code
* source:
* plugin: table
* table_name: autoban
* id_fields:
* type:
* type: string
* message:
* type: string
* threshold:
* type: integer
* user_type:
* type: integer
* ip_type:
* type: integer
* referer:
* type: string
* fields:
* type: type
* message: message
* threshold: threshold
* user_type: user_type
* ip_type: ip_type
* referer: referer
* @endcode
*
* In this example shows how to retrieve data from autoban source
* table.
*
* For additional configuration keys, refer to the parent classes.
*
* @see \Drupal\migrate\Plugin\migrate\source\SqlBase
*
*
* @MigrateSource(
* @MigrateSource(
* id = "table"
* id = "table"
...
@@ -16,6 +75,11 @@ use Drupal\migrate\Plugin\MigrationInterface;
...
@@ -16,6 +75,11 @@ use Drupal\migrate\Plugin\MigrationInterface;
*/
*/
class
Table
extends
SqlBase
{
class
Table
extends
SqlBase
{
/**
* Table alias.
*
* @var string
*/
const
TABLE_ALIAS
=
't'
;
const
TABLE_ALIAS
=
't'
;
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment