XF 2.0 Error getters XFRM

XenConcept

Well-known member
Hello,

I have a worry. I add a column "views count" but I get the following error:

Entity :

PHP:
class ResourceItem extends XFCP_ResourceItem
{

    public static function getStructure(Structure $structure)
    {
        $structure = parent::getStructure($structure);

        $structure->columns['views_count'] = ['type' => self::UINT, 'default' => 0, 'forced' => true];

        return $structure;
    }

}

Screenshot_4.webp

Modification Template :

Code:
$0

<dl class="pairs pairs--justified structItem-minor structItem-metaItem structItem-metaItem--views">
    <dt>{{ phrase('views') }}</dt>
    <dd>{$resource.views_count|number}</dd>
</dl>


Dump :

Screenshot_5.webp
 
Have you confirmed that your class extension is getting loaded/triggered as you expect? I would guess not.
 
Back
Top Bottom