1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Utils/Traits/UserSettings.php

29 lines
497 B
PHP
Raw Normal View History

<?php
namespace App\Utils\Traits;
2019-01-27 00:22:57 +01:00
/**
* Class UserSettings
* @package App\Utils\Traits
*/
trait UserSettings
{
2019-01-27 00:22:57 +01:00
/**
* @param string $entity
* @return \stdClass
*/
public function getEntity(string $entity) : \stdClass
{
return $this->settings()->{$entity};
}
2019-01-27 00:22:57 +01:00
/**
* @param string $entity
* @return \stdClass
*/
public function getColumnVisibility(string $entity) : \stdClass
{
return $this->settings()->{class_basename($entity)}->datatable->column_visibility;
}
}