mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MNT Remove unnecessary @var
comments (#172)
This commit is contained in:
parent
0ba023dd16
commit
16a20fc3ce
@ -401,9 +401,7 @@ class Report extends ViewableData
|
|||||||
GridFieldDataColumns::create(),
|
GridFieldDataColumns::create(),
|
||||||
GridFieldPaginator::create()
|
GridFieldPaginator::create()
|
||||||
);
|
);
|
||||||
/** @var GridField $gridField */
|
|
||||||
$gridField = GridField::create('Report', null, $items, $gridFieldConfig);
|
$gridField = GridField::create('Report', null, $items, $gridFieldConfig);
|
||||||
/** @var GridFieldDataColumns $columns */
|
|
||||||
$columns = $gridField->getConfig()->getComponentByType(GridFieldDataColumns::class);
|
$columns = $gridField->getConfig()->getComponentByType(GridFieldDataColumns::class);
|
||||||
$displayFields = [];
|
$displayFields = [];
|
||||||
$fieldCasting = [];
|
$fieldCasting = [];
|
||||||
@ -431,7 +429,6 @@ class Report extends ViewableData
|
|||||||
} else {
|
} else {
|
||||||
$fieldFormatting[$source] = function ($value, $item) {
|
$fieldFormatting[$source] = function ($value, $item) {
|
||||||
if ($item instanceof CMSPreviewable) {
|
if ($item instanceof CMSPreviewable) {
|
||||||
/** @var CMSPreviewable $item */
|
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'<a class="grid-field__link-block" href="%s" title="%s">%s</a>',
|
'<a class="grid-field__link-block" href="%s" title="%s">%s</a>',
|
||||||
Convert::raw2att($item->CMSEditLink()),
|
Convert::raw2att($item->CMSEditLink()),
|
||||||
@ -532,7 +529,6 @@ class Report extends ViewableData
|
|||||||
{
|
{
|
||||||
$params = [];
|
$params = [];
|
||||||
if (Injector::inst()->has(HTTPRequest::class)) {
|
if (Injector::inst()->has(HTTPRequest::class)) {
|
||||||
/** @var HTTPRequest $request */
|
|
||||||
$request = Injector::inst()->get(HTTPRequest::class);
|
$request = Injector::inst()->get(HTTPRequest::class);
|
||||||
$params = $request->param('filters') ?: $request->requestVar('filters') ?: [];
|
$params = $request->param('filters') ?: $request->requestVar('filters') ?: [];
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,6 @@ class ReportAdmin extends LeftAndMain implements PermissionProvider
|
|||||||
public function Reports()
|
public function Reports()
|
||||||
{
|
{
|
||||||
$output = new ArrayList();
|
$output = new ArrayList();
|
||||||
/** @var Report $report */
|
|
||||||
foreach (Report::get_reports() as $report) {
|
foreach (Report::get_reports() as $report) {
|
||||||
if ($report->canView()) {
|
if ($report->canView()) {
|
||||||
$output->push($report);
|
$output->push($report);
|
||||||
@ -160,9 +159,6 @@ class ReportAdmin extends LeftAndMain implements PermissionProvider
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Breadcrumbs for the ReportAdmin
|
* Returns the Breadcrumbs for the ReportAdmin
|
||||||
*
|
|
||||||
* @param bool $unlinked
|
|
||||||
* @return ArrayList
|
|
||||||
*/
|
*/
|
||||||
public function Breadcrumbs($unlinked = false)
|
public function Breadcrumbs($unlinked = false)
|
||||||
{
|
{
|
||||||
@ -235,9 +231,8 @@ class ReportAdmin extends LeftAndMain implements PermissionProvider
|
|||||||
GridFieldFooter::create()
|
GridFieldFooter::create()
|
||||||
);
|
);
|
||||||
$gridField = GridField::create('Reports', false, $this->Reports(), $gridFieldConfig);
|
$gridField = GridField::create('Reports', false, $this->Reports(), $gridFieldConfig);
|
||||||
/** @var GridFieldDataColumns $columns */
|
|
||||||
$columns = $gridField->getConfig()
|
$columns = $gridField->getConfig()
|
||||||
->getComponentByType('SilverStripe\\Forms\\GridField\\GridFieldDataColumns');
|
->getComponentByType(GridFieldDataColumns::class);
|
||||||
$columns->setDisplayFields(array(
|
$columns->setDisplayFields(array(
|
||||||
'title' => _t('SilverStripe\\Reports\\ReportAdmin.ReportTitle', 'Title'),
|
'title' => _t('SilverStripe\\Reports\\ReportAdmin.ReportTitle', 'Title'),
|
||||||
));
|
));
|
||||||
|
Loading…
Reference in New Issue
Block a user