<?php

namespace Drupal\edlp_studio\Entity;

use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityChangedInterface;
use Drupal\user\EntityOwnerInterface;

/**
 * Provides an interface for defining Chutier entities.
 *
 * @ingroup edlp_studio
 */
interface ChutierInterface extends ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface {

  // Add get/set methods for your configuration properties here.

  /**
   * Gets the Chutier name.
   *
   * @return string
   *   Name of the Chutier.
   */
  public function getName();

  /**
   * Sets the Chutier name.
   *
   * @param string $name
   *   The Chutier name.
   *
   * @return \Drupal\edlp_studio\Entity\ChutierInterface
   *   The called Chutier entity.
   */
  public function setName($name);

  /**
   * Gets the Chutier creation timestamp.
   *
   * @return int
   *   Creation timestamp of the Chutier.
   */
  public function getCreatedTime();

  /**
   * Sets the Chutier creation timestamp.
   *
   * @param int $timestamp
   *   The Chutier creation timestamp.
   *
   * @return \Drupal\edlp_studio\Entity\ChutierInterface
   *   The called Chutier entity.
   */
  public function setCreatedTime($timestamp);

  /**
   * Returns the Chutier published status indicator.
   *
   * Unpublished Chutier are only visible to restricted users.
   *
   * @return bool
   *   TRUE if the Chutier is published.
   */
  public function isPublished();

  /**
   * Sets the published status of a Chutier.
   *
   * @param bool $published
   *   TRUE to set this Chutier to published, FALSE to set it to unpublished.
   *
   * @return \Drupal\edlp_studio\Entity\ChutierInterface
   *   The called Chutier entity.
   */
  public function setPublished($published);

  /**
   * get the contents in user's chutiers
   *
   * @param int $uid
   *   user id
   *
   * @return array
   *   associative array of contents by chutiers
   *
   */
  public static function getUserChutiersContents($uid);


  /**
   * get the contents in user's chutiers
   *
   * @param int $id
   *   content id
   *
   * @param int $uid
   *   user id
   *
   * @return Drupal\Core\Url
   *   depending on action is add or remove
   *
   */
  public static function getActionsURL($id, $uid);

}
