Giter Club home page Giter Club logo

codeigniter4-forms's People

Contributors

dependabot[bot] avatar mgatner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

codeigniter4-forms's Issues

Bug: Singleton Routes

Singleton routes need withDeleted() so they can still display (if allowed) when removed.

Feature: Model::toForm()

Some methodology for creating a form automatically from model properties and their associated entities.

Formatter won't convert entities

Once $this->respond() is called the data needs to be ready for Formatter, but it will not convert entities. Each method should check for returnType and convert if necessary. E.g. index():

		$data = $this->model->findAll();
		
		// Entities have to be converted
		if (! in_array($this->model->returnType, ['array', 'object']))
		{
			$tmpData = [];
			
			foreach ($data as $entity)
			{
				$tmpData[] = $entity->toArray();
			}
			
			$data = $tmpData;
		}
		return $this->respond($data);

Bug: ResourcePresenter::delete() missing redirect

Should be something like this:

	public function delete($id = null)
	{
		if (($object = $this->ensureExists($id)) instanceof RedirectResponse)
		{
			return $object;
		}
		
		if (! $this->model->delete($id))
		{
			return $this->actionFailed('delete');			
		}
		
		$this->alert('success', lang('Forms.deleted', [$this->name]));
		
		return redirect()->to("{$this->names}");
	}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.