gordonbanderson /
silverstripe-site-rss-feed
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Created by PhpStorm. |
||
| 4 | * User: gordon |
||
| 5 | * Date: 29/4/2561 |
||
| 6 | * Time: 15:05 น. |
||
| 7 | */ |
||
| 8 | |||
| 9 | namespace Suilven\RSS\Controller; |
||
| 10 | |||
| 11 | |||
| 12 | use SilverStripe\CMS\Controllers\ContentController; |
||
|
0 ignored issues
–
show
|
|||
| 13 | use SilverStripe\Control\RSS\RSSFeed; |
||
|
0 ignored issues
–
show
The type
SilverStripe\Control\RSS\RSSFeed was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 14 | |||
| 15 | class RSSFeedController extends ContentController |
||
| 16 | { |
||
| 17 | public function init() |
||
| 18 | { |
||
| 19 | parent::init(); |
||
| 20 | } |
||
| 21 | |||
| 22 | public function index() |
||
| 23 | { |
||
| 24 | $rss = new RSSFeed( |
||
| 25 | $this->LatestUpdates(), |
||
| 26 | $this->Link(), |
||
| 27 | "25 Most Recently Created Pages", |
||
| 28 | "Shows a list of the 25 most recently updated pages." |
||
| 29 | ); |
||
| 30 | |||
| 31 | return $rss->outputToBrowser(); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function LatestUpdates() |
||
| 35 | { |
||
| 36 | return \Page::get()->sort("Created", "DESC")->limit(25); |
||
|
0 ignored issues
–
show
The type
Page was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 37 | } |
||
| 38 | } |
||
| 39 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths