Swat/SwatNavBar.php
public function replaceEntryByPosition(
        $position,
        SwatNavBarEntry $new_entry
    ) {
        if (isset($this->entries[$position])) {
            $old_entry = $this->entries[$position];
            $this->entries[$position] = $new_entry;

            return $old_entry;
        }

        throw new SwatException(
            sprintf(
                'Cannot replace element at position ' .
                    '%s because NavBar does not contain an entry at position %s.',
                $position,
                $position
            )
        );
    }
public function replaceEntryByPosition(
        $position,
        SwatNavBarEntry $new_entry
    ) {
        if (isset($this->entries[$position])) {
            $old_entry = $this->entries[$position];
            $this->entries[$position] = $new_entry;

            return $old_entry;
        }

        throw new SwatException(
            sprintf(
                'Cannot replace element at position ' .
                    '%s because NavBar does not contain an entry at position %s.',
                $position,
                $position
            )
        );
    }
public function replaceEntryByPosition ( $ position , SwatNavBarEntry $ new_entry ) { if ( isset ( $ this -> entries [ $ position ] ) ) { $ old_entry = $ this -> entries [ $ position ] ; $ this -> entries [ $ position ] = $ new_entry ; return $ old_entry ; } throw new SwatException ( sprintf ( 'Cannot replace element at position ' . '%s because NavBar does not contain an entry at position %s.' , $ position , $ position ) ) ; }
Replaces an entry in this navigation bar

If the entry is not in this navigation bar, an exception is thrown.

@param integer $position zero-based ordinal position of the entry
to replace.
@param SwatNavBarEntry $entry the navbar entry to replace the element
at the given position with.

@return SwatNavBarEntry the replaced entry.

@thows SwatException
Replaces an entry in this navigation bar