Renamed getDatetimeAdded so it has the same name as the coloumn name

This commit is contained in:
Jan Böhmer 2019-03-05 13:57:40 +01:00
parent 336ff7b103
commit 52acac3681
3 changed files with 7 additions and 9 deletions

View file

@ -50,8 +50,8 @@ class Category extends PartsContainingDBElement
protected $parts; protected $parts;
/** /**
* @var bool * @var string
* @ORM\Column(type="boolean") * @ORM\Column(type="string")
*/ */
protected $partname_hint; protected $partname_hint;

View file

@ -69,7 +69,7 @@ abstract class NamedDBElement extends DBElement
/** /**
* Returns the last time when the element was modified. * Returns the last time when the element was modified.
* @return string The time of the last edit. * @return \DateTime The time of the last edit.
*/ */
public function getLastModified() : \DateTime public function getLastModified() : \DateTime
{ {
@ -78,13 +78,10 @@ abstract class NamedDBElement extends DBElement
/** /**
* Returns the date/time when the element was created. * Returns the date/time when the element was created.
* @param $formatted bool When true, the date gets formatted with the locale and timezone settings. * @return \DateTime The creation time of the part.
* When false, the raw value from the DB is returned.
* @return string The creation time of the part.
*/ */
public function getDatetimeAdded() : \DateTime public function getAddedDate() : \DateTime
{ {
//TODO
return $this->addedDate; return $this->addedDate;
} }
@ -102,6 +99,7 @@ abstract class NamedDBElement extends DBElement
* So you don't have to do this yourself. * So you don't have to do this yourself.
* *
* @param string $new_name the new name * @param string $new_name the new name
* @return self
*/ */
public function setName(string $new_name) : self public function setName(string $new_name) : self
{ {

View file

@ -213,7 +213,7 @@
<div class="form-group"> <div class="form-group">
<label>{% trans %}lastModified{% endtrans %}:</label> <label>{% trans %}lastModified{% endtrans %}:</label>
<p>{{ part.lastModified | date }} <p>{{ part.addedDate | date }}
{# {if !empty($last_modified_user)} {% trans %}by{% endtrans %} {# {if !empty($last_modified_user)} {% trans %}by{% endtrans %}
{if $can_visit_user} {if $can_visit_user}
<a href="{$relative_path}user_info.php?uid={$last_modified_user_id}">{$last_modified_user}</a> <a href="{$relative_path}user_info.php?uid={$last_modified_user_id}">{$last_modified_user}</a>