silverstripe-externallinks/code/BrokenExternalLinks.php
2013-08-26 09:50:20 +12:00

45 lines
722 B
PHP

<?php
class BrokenExternalLinks extends DataObject {
private static $db = array(
'Link' => 'Varchar',
'HTTPCode' =>'Int'
);
private static $has_one = array(
'Page' => 'Page'
);
public static $summary_fields = array(
'Page.Title' => 'Page',
'HTTPCode' => 'HTTP Code',
'Created' => 'Created'
);
public static $searchable_fields = array(
'HTTPCode'
);
function canEdit($member = false) {
return false;
}
}
class BrokenExternalLinksAdmin extends ModelAdmin {
public static $url_segment = 'broken-external-links-admin';
public static $managed_models = array(
'BrokenExternalLinks'
);
public static $menu_title = 'Broken Ext. links';
public function init() {
parent::init();
}
}