<?php
/**
 * Class represents records from table pages
 * {autogenerated}
 * @property int $link_id PK
 * @property string $title
 * @property string|null $desc
 * @property string $url
 * @property datetime|null $dattm
 * @property int|null $onmenu
 * @property int|null $hide
 * {/autogenerated}
 */
class Link extends ResourceAbstract
{
    public function getUrl()
    {
        return $this->url;
    }
}

/**
 * @extends ResourceAbstractTable<Link>
 * @method Link[] findByOnmenu($value, $start = null, $count = null, $orderBy = null)
 */
class LinkTable extends ResourceAbstractTable
{
    protected $_key = 'link_id';
    protected $_table = '?_link';
    protected $_recordClass = 'Link';

    public function getAccessType()
    {
        return ResourceAccess::LINK;
    }

    public function getAccessTitle()
    {
        return ___('Links');
    }

    public function getPageId()
    {
        return 'links';
    }
}