';
?>
steps[] = $step;
?>
steps as $step) {
if ($step != targetStep) {
$tempArray[] = $step;
}
}
$this->steps = $tempArray;
}
public function GetSteps() {
return $this->steps;
}
public function drawSteps() {
//draw the actual icons in the container div.
foreach ($this->steps as $step) {
if ($this->numStepsInArray < $this->maxNumStepsInArray) {
new DisplayStep($step->type, null, $step->name, $step->id);
$this->numStepsInArray++;
if ($this->numStepsInArray < $this->maxNumStepsInArray && $this->numStepsInArray < count($this->steps)) {
echo "";
}
}
}
}
public function moveStep($direction) {
$key = array_search($this->selectedStep, $this->steps);
echo $key;
}
private function moveEntry(&$array, $key, $dir) {
if ($dir == -1) { // move up
if ($key > 0) {
$reverseArray = array_reverse(array_slice($array, $key - 1, 2, true)); // make a reversed array of the two entries, preserving keys
array_splice($array, $key - 1, 2, $reverseArray); // replace the given range in the oldArray with the reversed Array
}
} else if ($dir == 1) { // move down
if ($key < count($array) - 1) {
$reverseArray = array_reverse(array_slice($array, $key, 2, true)); // make a reversed array of the two entries, preserving keys
array_splice($array, $key, 2, $reverseArray); // replace the given range in the oldArray with the reversed Array
}
}
}
}
?>