Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removing unused setters #1

Merged
merged 1 commit into from
Oct 16, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 0 additions & 114 deletions workbench/monarkee/bumble/src/Monarkee/Bumble/Models/BumbleModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ public function __construct(array $attributes = [])
$this->checkIfTableExists();

if (method_exists($this, 'setComponents')) $this->setComponents();
$this->setImageFields();
$this->setBinaryFields();
$this->setSlugFields();
$this->setPasswordFields();
}

/**
Expand Down Expand Up @@ -202,102 +198,6 @@ public function getShowInTopNav()
return $this->showInTopNav;
}

/**
* @return bool
*/
public function hasImageFields()
{
// Loop through the components and determine if any are ImageFields
foreach ($this->getComponents() as $component)
{
if ($component->isImageField()) return true;
}
}

/**
*
*/
public function getImageFields()
{
return $this->imageFields;
}

/**
*
*/
private function setImageFields()
{
// Loop through the components and determine if any are ImageFields
foreach ($this->getComponents() as $component)
{
if ($component->isImageField()) {
$this->imageFields[] = $component;
}
}
}

/**
* @return bool
*/
public function hasBinaryFields()
{
foreach ($this->getComponents() as $component)
{
if ($component->isBinaryField()) return true;
}
}

/**
* @return mixed
*/
public function getBinaryFields()
{
return $this->binaryFields;
}

/**
*
*/
private function setBinaryFields()
{
foreach ($this->getComponents() as $component) {
if ($component->isBinaryField()) {
$this->binaryFields[] = $component;
}
}
}

/**
* @return bool
*/
public function hasSlugFields()
{
foreach ($this->getComponents() as $component)
{
if ($component->isSlugField()) return true;
}
}

/**
* @return mixed
*/
public function getSlugFields()
{
return $this->slugFields;
}

/**
*
*/
private function setSlugFields()
{
foreach ($this->getComponents() as $component) {
if ($component->isSlugField()) {
$this->slugFields[] = $component;
}
}
}

/**
* @return bool
* @throws TableNotFoundException
Expand All @@ -319,18 +219,4 @@ public function hasFieldTypes($type)
if ($component->isFieldType($type)) return true;
}
}

public function getPasswordFields()
{
return $this->passwordFields;
}

public function setPasswordFields()
{
foreach ($this->getComponents() as $component) {
if ($component->isFieldType('PasswordField')) {
$this->passwordFields[] = $component;
}
}
}
}