Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
05422fed
Commit
05422fed
authored
9 years ago
by
twistor
Committed by
Chris Leppanen
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue #2497729 by twistor: Implement all methods on FeedsMissingPlugin
parent
c17412e2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
feeds.plugins.inc
+2
-1
2 additions, 1 deletion
feeds.plugins.inc
feeds_ui/feeds_ui.admin.inc
+5
-4
5 additions, 4 deletions
feeds_ui/feeds_ui.admin.inc
plugins/FeedsPlugin.inc
+69
-0
69 additions, 0 deletions
plugins/FeedsPlugin.inc
with
76 additions
and
5 deletions
feeds.plugins.inc
+
2
−
1
View file @
05422fed
...
@@ -21,7 +21,8 @@ function _feeds_feeds_plugins() {
...
@@ -21,7 +21,8 @@ function _feeds_feeds_plugins() {
),
),
);
);
$info
[
'FeedsMissingPlugin'
]
=
array
(
$info
[
'FeedsMissingPlugin'
]
=
array
(
'hidden'
=>
TRUE
,
'name'
=>
'Missing plugin'
,
'description'
=>
'There is a problem with your configuration.'
,
'handler'
=>
array
(
'handler'
=>
array
(
'class'
=>
'FeedsMissingPlugin'
,
'class'
=>
'FeedsMissingPlugin'
,
'file'
=>
'FeedsPlugin.inc'
,
'file'
=>
'FeedsPlugin.inc'
,
...
...
This diff is collapsed.
Click to expand it.
feeds_ui/feeds_ui.admin.inc
+
5
−
4
View file @
05422fed
...
@@ -315,7 +315,8 @@ function feeds_ui_edit_page(FeedsImporter $importer, $active = 'help', $plugin_k
...
@@ -315,7 +315,8 @@ function feeds_ui_edit_page(FeedsImporter $importer, $active = 'help', $plugin_k
break
;
break
;
case
'mapping'
:
case
'mapping'
:
$active_container
[
'title'
]
=
t
(
'Mapping for !processor'
,
array
(
'!processor'
=>
$plugins
[
$config
[
'processor'
][
'plugin_key'
]][
'name'
]));
$processor_name
=
isset
(
$plugins
[
$config
[
'processor'
][
'plugin_key'
]][
'name'
])
?
$plugins
[
$config
[
'processor'
][
'plugin_key'
]][
'name'
]
:
$plugins
[
'FeedsMissingPlugin'
][
'name'
];
$active_container
[
'title'
]
=
t
(
'Mapping for @processor'
,
array
(
'@processor'
=>
$processor_name
));
$active_container
[
'body'
]
=
drupal_get_form
(
'feeds_ui_mapping_form'
,
$importer
);
$active_container
[
'body'
]
=
drupal_get_form
(
'feeds_ui_mapping_form'
,
$importer
);
break
;
break
;
}
}
...
@@ -349,7 +350,7 @@ function feeds_ui_edit_page(FeedsImporter $importer, $active = 'help', $plugin_k
...
@@ -349,7 +350,7 @@ function feeds_ui_edit_page(FeedsImporter $importer, $active = 'help', $plugin_k
$config_info
[]
=
$info
;
$config_info
[]
=
$info
;
// Fetcher.
// Fetcher.
$fetcher
=
$plugins
[
$config
[
'fetcher'
][
'plugin_key'
]];
$fetcher
=
isset
(
$plugins
[
$config
[
'fetcher'
][
'plugin_key'
]]
)
?
$plugins
[
$config
[
'fetcher'
][
'plugin_key'
]]
:
$plugins
[
'FeedsMissingPlugin'
]
;
$actions
=
array
();
$actions
=
array
();
if
(
$importer
->
fetcher
->
hasConfigForm
())
{
if
(
$importer
->
fetcher
->
hasConfigForm
())
{
$actions
=
array
(
l
(
t
(
'Settings'
),
$path
.
'/settings/'
.
$config
[
'fetcher'
][
'plugin_key'
]));
$actions
=
array
(
l
(
t
(
'Settings'
),
$path
.
'/settings/'
.
$config
[
'fetcher'
][
'plugin_key'
]));
...
@@ -366,7 +367,7 @@ function feeds_ui_edit_page(FeedsImporter $importer, $active = 'help', $plugin_k
...
@@ -366,7 +367,7 @@ function feeds_ui_edit_page(FeedsImporter $importer, $active = 'help', $plugin_k
$config_info
[]
=
$info
;
$config_info
[]
=
$info
;
// Parser.
// Parser.
$parser
=
$plugins
[
$config
[
'parser'
][
'plugin_key'
]];
$parser
=
isset
(
$plugins
[
$config
[
'parser'
][
'plugin_key'
]]
)
?
$plugins
[
$config
[
'parser'
][
'plugin_key'
]]
:
$plugins
[
'FeedsMissingPlugin'
]
;
$actions
=
array
();
$actions
=
array
();
if
(
$importer
->
parser
->
hasConfigForm
())
{
if
(
$importer
->
parser
->
hasConfigForm
())
{
$actions
=
array
(
l
(
t
(
'Settings'
),
$path
.
'/settings/'
.
$config
[
'parser'
][
'plugin_key'
]));
$actions
=
array
(
l
(
t
(
'Settings'
),
$path
.
'/settings/'
.
$config
[
'parser'
][
'plugin_key'
]));
...
@@ -383,7 +384,7 @@ function feeds_ui_edit_page(FeedsImporter $importer, $active = 'help', $plugin_k
...
@@ -383,7 +384,7 @@ function feeds_ui_edit_page(FeedsImporter $importer, $active = 'help', $plugin_k
$config_info
[]
=
$info
;
$config_info
[]
=
$info
;
// Processor.
// Processor.
$processor
=
$plugins
[
$config
[
'processor'
][
'plugin_key'
]];
$processor
=
isset
(
$plugins
[
$config
[
'processor'
][
'plugin_key'
]]
)
?
$plugins
[
$config
[
'processor'
][
'plugin_key'
]]
:
$plugins
[
'FeedsMissingPlugin'
]
;
$actions
=
array
();
$actions
=
array
();
if
(
$importer
->
processor
->
hasConfigForm
())
{
if
(
$importer
->
processor
->
hasConfigForm
())
{
$actions
[]
=
l
(
t
(
'Settings'
),
$path
.
'/settings/'
.
$config
[
'processor'
][
'plugin_key'
]);
$actions
[]
=
l
(
t
(
'Settings'
),
$path
.
'/settings/'
.
$config
[
'processor'
][
'plugin_key'
]);
...
...
This diff is collapsed.
Click to expand it.
plugins/FeedsPlugin.inc
+
69
−
0
View file @
05422fed
...
@@ -272,9 +272,78 @@ class FeedsMissingPlugin extends FeedsPlugin {
...
@@ -272,9 +272,78 @@ class FeedsMissingPlugin extends FeedsPlugin {
public
function
pluginType
()
{
public
function
pluginType
()
{
return
'missing'
;
return
'missing'
;
}
}
public
function
save
()
{}
/**
* Fetcher methods.
*/
public
function
fetch
(
FeedsSource
$source
)
{
return
new
FeedsFetcherResult
(
''
);
}
public
function
clear
(
FeedsSource
$source
)
{}
public
function
request
(
$feed_nid
=
0
)
{
drupal_access_denied
();
}
public
function
menuItem
()
{
public
function
menuItem
()
{
return
array
();
return
array
();
}
}
public
function
subscribe
(
FeedsSource
$source
)
{}
public
function
unsubscribe
(
FeedsSource
$source
)
{}
public
function
importPeriod
(
FeedsSource
$source
)
{}
/**
* Parser methods.
*/
public
function
parse
(
FeedsSource
$source
,
FeedsFetcherResult
$fetcher_result
)
{
return
new
FeedsParserResult
();
}
public
function
getMappingSources
()
{
return
array
();
}
/**
* Processor methods.
*/
public
function
process
(
FeedsSource
$source
,
FeedsParserResult
$parser_result
)
{}
public
function
entityType
()
{}
public
function
bundle
()
{}
public
function
bundleOptions
()
{
return
array
();
}
public
function
getLimit
()
{
return
0
;
}
public
function
getMappings
()
{
return
array
();
}
public
function
getMappingTargets
()
{
return
array
();
}
public
function
expire
(
FeedsSource
$source
,
$time
=
NULL
)
{}
public
function
itemCount
(
FeedsSource
$source
)
{
return
0
;
}
public
function
expiryTime
()
{
return
FEEDS_EXPIRE_NEVER
;
}
}
}
/**
/**
...
...
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