Skip to content

Commit

Permalink
Added setAttribute method for all options - option can be set at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Kluska committed May 12, 2017
1 parent 9c99d54 commit b4cd3d5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/Traits/BasePositionTrait.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Pion\Support\Eloquent\Position\Traits;

/**
Expand Down Expand Up @@ -121,4 +122,26 @@ protected function resetPositionOptionCache()
}

//endregion

//region Override of attribute set for options
/**
* Enables setting disablePositionUpdate option in runtime
*
* @param boolean $value
*/
public function setDisablePositionUpdateAttribute($value)
{
$this->optionCache['disablePositionUpdate'] = $value;
}

/**
* Enables setting positionColumn option in runtime
*
* @param string $value
*/
public function setPositionColumnAttribute($value)
{
$this->optionCache['positionColumn'] = $value;
}
//endregion
}

0 comments on commit b4cd3d5

Please sign in to comment.