forked from instride-ch/pimcore-data-definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLog.php
More file actions
79 lines (65 loc) · 1.61 KB
/
Copy pathLog.php
File metadata and controls
79 lines (65 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/**
* Data Definitions.
*
* LICENSE
*
* This source file is subject to the GNU General Public License version 3 (GPLv3)
* For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
* files that are distributed with this source code.
*
* @copyright Copyright (c) 2016-2019 w-vision AG (https://www.w-vision.ch)
* @license https://github.com/w-vision/DataDefinitions/blob/master/gpl-3.0.txt GNU General Public License version 3 (GPLv3)
*/
declare(strict_types=1);
namespace Wvision\Bundle\DataDefinitionsBundle\Model;
use Exception;
use Pimcore\Model\AbstractModel;
use Wvision\Bundle\DataDefinitionsBundle\Model\Log\Dao;
class Log extends AbstractModel
{
protected $id;
protected $definition;
protected $o_id;
public static function getById($id)
{
if (!is_numeric($id) || $id < 1) {
return null;
}
try {
$obj = new self;
/**
* @var Dao $dao
*/
$dao = $obj->getDao();
$dao->getById($id);
return $obj;
} catch (Exception $ex) {
return null;
}
}
public function getId()
{
return $this->id;
}
public function setId($id)
{
$this->id = $id;
}
public function getDefinition()
{
return $this->definition;
}
public function setDefinition($definition)
{
$this->definition = $definition;
}
public function getO_Id()
{
return $this->o_id;
}
public function setO_Id($o_id)
{
$this->o_id = $o_id;
}
}