Skip to content

Commit

Permalink
Move back the functions to headcell
Browse files Browse the repository at this point in the history
  • Loading branch information
iranianpep committed Sep 23, 2016
1 parent 054e359 commit de939c0
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 84 deletions.
84 changes: 84 additions & 0 deletions src/PhpTableGenerator/HeadCell.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,26 @@ class HeadCell extends Cell
*/
private $selectAllSelector;

/**
* @var
*/
private $listSortByKey;

/**
* @var
*/
private $listSortBy;

/**
* @var
*/
private $listSortDirKey;

/**
* @var
*/
private $listSortDir;

public function __construct($title = null, $alias = null, $content = null, $htmlspecialchars = false)
{
if ($title !== null) {
Expand Down Expand Up @@ -185,6 +205,70 @@ public function getSortDir()
return ($alias === $listSortBy && $listSortDir === 'asc') ? 'desc' : 'asc';
}

/**
* @return string
*/
public function getListSortByKey()
{
return $this->listSortByKey;
}

/**
* @param string $listSortByKey
*/
public function setListSortByKey($listSortByKey)
{
$this->listSortByKey = $listSortByKey;
}

/**
* @return string
*/
public function getListSortBy()
{
return $this->listSortBy;
}

/**
* @param string $listSortBy
*/
public function setListSortBy($listSortBy)
{
$this->listSortBy = $listSortBy;
}

/**
* @return string
*/
public function getListSortDirKey()
{
return $this->listSortDirKey;
}

/**
* @param string $listSortDirKey
*/
public function setListSortDirKey($listSortDirKey)
{
$this->listSortDirKey = $listSortDirKey;
}

/**
* @return string
*/
public function getListSortDir()
{
return $this->listSortDir;
}

/**
* @param $listSortDir
*/
public function setListSortDir($listSortDir)
{
$this->listSortDir = (strtolower($listSortDir) === 'asc') ? 'asc' : 'desc';
}

/**
* @return string
* @throws \Exception
Expand Down
84 changes: 0 additions & 84 deletions src/PhpTableGenerator/TableGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,6 @@ abstract class TableGenerator
*/
private $data;

/**
* @var
*/
private $listSortByKey;

/**
* @var
*/
private $listSortBy;

/**
* @var
*/
private $listSortDirKey;

/**
* @var
*/
private $listSortDir;

/**
* initialize a TableGenerator object
*
Expand Down Expand Up @@ -150,68 +130,4 @@ public function getAllAttributesHtml()
* @return string
*/
abstract public function getHtml();

/**
* @return string
*/
public function getListSortByKey()
{
return $this->listSortByKey;
}

/**
* @param string $listSortByKey
*/
public function setListSortByKey($listSortByKey)
{
$this->listSortByKey = $listSortByKey;
}

/**
* @return string
*/
public function getListSortBy()
{
return $this->listSortBy;
}

/**
* @param string $listSortBy
*/
public function setListSortBy($listSortBy)
{
$this->listSortBy = $listSortBy;
}

/**
* @return string
*/
public function getListSortDirKey()
{
return $this->listSortDirKey;
}

/**
* @param string $listSortDirKey
*/
public function setListSortDirKey($listSortDirKey)
{
$this->listSortDirKey = $listSortDirKey;
}

/**
* @return string
*/
public function getListSortDir()
{
return $this->listSortDir;
}

/**
* @param $listSortDir
*/
public function setListSortDir($listSortDir)
{
$this->listSortDir = (strtolower($listSortDir) === 'asc') ? 'asc' : 'desc';
}
}

0 comments on commit de939c0

Please sign in to comment.